Package org.eclipse.pde.core.target
Class NameVersionDescriptor
- java.lang.Object
-
- org.eclipse.pde.core.target.NameVersionDescriptor
-
public class NameVersionDescriptor extends Object
Describes something with a name and version.- Since:
- 3.8
- Restriction:
- This class is not intended to be subclassed by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static StringTYPE_FEATUREstatic StringTYPE_PACKAGEstatic StringTYPE_PLUGIN
-
Constructor Summary
Constructors Constructor Description NameVersionDescriptor(String id, String version)Constructs a descriptor with a type of 'plugin'NameVersionDescriptor(String id, String version, String type)Constructs a descriptor of the given type
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)static NameVersionDescriptorfromPortableString(String portable)Creates a descriptor from a portable string.StringgetId()StringgetType()StringgetVersion()inthashCode()StringtoPortableString()Returns a portable form for this descriptor.StringtoString()
-
-
-
Field Detail
-
TYPE_PLUGIN
public static final String TYPE_PLUGIN
- See Also:
- Constant Field Values
-
TYPE_FEATURE
public static final String TYPE_FEATURE
- See Also:
- Constant Field Values
-
TYPE_PACKAGE
public static final String TYPE_PACKAGE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
NameVersionDescriptor
public NameVersionDescriptor(String id, String version)
Constructs a descriptor with a type of 'plugin'If the passed string version is equal to
BundleInfo.EMPTY_VERSION, the version will be replaced withnull.- Parameters:
id- name identifierversion- version identifier, can benull
-
NameVersionDescriptor
public NameVersionDescriptor(String id, String version, String type)
Constructs a descriptor of the given typeIf the passed string version is equal to
BundleInfo.EMPTY_VERSION, the version will be replaced withnull.- Parameters:
id- name identifierversion- version identifier, can benulltype- type of object this descriptor represents, should be one of the TYPE constants defined in this file
-
-
Method Detail
-
getId
public String getId()
-
getVersion
public String getVersion()
-
getType
public String getType()
-
fromPortableString
public static NameVersionDescriptor fromPortableString(String portable)
Creates a descriptor from a portable string.- Parameters:
portable- generated fromtoPortableString()- Returns:
- descriptor
-
toPortableString
public String toPortableString()
Returns a portable form for this descriptor.- Returns:
- portable form
-
-