Class NameVersionDescriptor


  • public class NameVersionDescriptor
    extends java.lang.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​(java.lang.String id,
                                     java.lang.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​(java.lang.String id,
                                     java.lang.String version,
                                     java.lang.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

      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public java.lang.String getId()
      • getVersion

        public java.lang.String getVersion()
      • getType

        public java.lang.String getType()
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • fromPortableString

        public static NameVersionDescriptor fromPortableString​(java.lang.String portable)
        Creates a descriptor from a portable string.
        Parameters:
        portable - generated from toPortableString()
        Returns:
        descriptor
      • toPortableString

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