KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > update > core > URLEntry


1 /*******************************************************************************
2  * Copyright (c) 2000, 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.update.core;
12
13 import org.eclipse.update.core.model.*;
14 import org.eclipse.update.internal.core.*;
15
16 /**
17  * Convenience implementation of an annotated URL.
18  * <p>
19  * This class may be instantiated or subclassed by clients.
20  * </p>
21  * <p>
22  * <b>Note:</b> This class/interface is part of an interim API that is still under development and expected to
23  * change significantly before reaching stability. It is being made available at this early stage to solicit feedback
24  * from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken
25  * (repeatedly) as the API evolves.
26  * </p>
27  * @see org.eclipse.update.core.IURLEntry
28  * @see org.eclipse.update.core.model.URLEntryModel
29  * @since 2.0
30  */

31 public class URLEntry extends URLEntryModel implements IURLEntry {
32
33     /**
34      * Default constructor for annotated URL
35      *
36      * @since 2.0
37      */

38     public URLEntry() {
39         super();
40     }
41
42     /**
43      * Returns a string representation of an annotated URL.
44      *
45      * @return annotated url as String
46      * @since 2.0
47      */

48     public String JavaDoc toString() {
49         String JavaDoc result = "IURLEntry: "; //$NON-NLS-1$
50
String JavaDoc URLString =
51             (getURL() == null) ? Messages.Feature_NoURL : getURL().toExternalForm();
52         result =
53             result
54                 + ((getAnnotation() == null) ? URLString : getAnnotation() + " : " + URLString); //$NON-NLS-1$
55
return result;
56     }
57 }
58
Popular Tags