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 Details

  • Constructor Details

    • 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 Details

    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

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

      public String getId()
    • getVersion

      public String getVersion()
    • getType

      public String getType()
    • toString

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

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

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