Class 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.
    • 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 with null.

        Parameters:
        id - name identifier
        version - version identifier, can be null
      • NameVersionDescriptor

        public NameVersionDescriptor​(String id,
                                     String version,
                                     String type)
        Constructs a descriptor of the given type

        If the passed string version is equal to BundleInfo.EMPTY_VERSION, the version will be replaced with null.

        Parameters:
        id - name identifier
        version - version identifier, can be null
        type - type of object this descriptor represents, should be one of the TYPE constants defined in this file
    • Method Detail

      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • getId

        public String getId()
      • getVersion

        public String getVersion()
      • getType

        public String getType()
      • toPortableString

        public String toPortableString()
        Returns a portable form for this descriptor.
        Returns:
        portable form