Utility class that represents either an available "Optional Package" (formerly known as "Standard Extension") as described in the manifest of a JAR file, or the requirement for such an optional package.
For more information about optional packages, see the document
Optional Package Versioning in the documentation bundle for your
Java2 Standard Edition package, in file
guide/extensions/versioning.html.
| Modifier and Type | Field and Description |
|---|---|
| public static final Compatibility | COMPATIBLE
Enum indicating that extension is compatible with other extension. |
| public static final Attributes. | EXTENSION_LIST
Manifest Attribute Name object for EXTENSION_LIST. |
| public static final Attributes. | EXTENSION_NAME
Manifest Attribute Name object for EXTENSION_NAME. |
| private String | extensionName
The name of the optional package being made available, or required. |
| public static final Attributes. | IMPLEMENTATION_URL
Manifest Attribute Name object for IMPLEMENTATION_URL. |
| public static final Attributes. | IMPLEMENTATION_VENDOR
Manifest Attribute Name object for IMPLEMENTATION_VENDOR. |
| public static final Attributes. | IMPLEMENTATION_VENDOR_ID
Manifest Attribute Name object for IMPLEMENTATION_VENDOR_ID. |
| public static final Attributes. | IMPLEMENTATION_VERSION
Manifest Attribute Name object for IMPLEMENTATION_VERSION. |
| private String | implementationURL
The URL from which the most recent version of this optional package can be obtained if it is not already installed. |
| private String | implementationVendor
The name of the company or organization that produced this implementation of this optional package. |
| private String | implementationVendorID
The unique identifier of the company that produced the optional package contained in this JAR file. |
| private DeweyDecimal | implementationVersion
The version number (dotted decimal notation) for this implementation of the optional package. |
| public static final Compatibility | INCOMPATIBLE
Enum indicating that extension is incompatible with other extension in ways other than other enums indicate). |
| public static final Attributes. | OPTIONAL_EXTENSION_LIST
|
| public static final Compatibility | REQUIRE_IMPLEMENTATION_UPGRADE
Enum indicating that extension requires an upgrade of implementation to be compatible with other extension. |
| public static final Compatibility | REQUIRE_SPECIFICATION_UPGRADE
Enum indicating that extension requires an upgrade of specification to be compatible with other extension. |
| public static final Compatibility | REQUIRE_VENDOR_SWITCH
Enum indicating that extension requires a vendor switch to be compatible with other extension. |
| public static final Attributes. | SPECIFICATION_VENDOR
Manifest Attribute Name object for SPECIFICATION_VENDOR. |
| public static final Attributes. | SPECIFICATION_VERSION
Manifest Attribute Name object for SPECIFICATION_VERSION. |
| private String | specificationVendor
The name of the company or organization that originated the specification to which this optional package conforms. |
| private DeweyDecimal | specificationVersion
The version number (dotted decimal notation) of the specification to which this optional package conforms. |
| Access | Constructor and Description |
|---|---|
| public | Extension(final String
the name of extension. extensionName, final String the specification Version of extension. specificationVersion, final String the specification Vendor of extension. specificationVendor, final String the implementation Version of extension. implementationVersion, final String the implementation Vendor of extension. implementationVendor, final String the implementation VendorId of extension. implementationVendorId, final String the implementation URL of extension. implementationURL)The constructor to create Extension object. |
| Modifier and Type | Method and Description |
|---|---|
| public static void | addExtension(final Extension
the extension extension, final Attributes the attributes of manifest to add to attributes)Add Extension to the specified manifest Attributes. |
| public static void | addExtension(final Extension
the extension extension, final String the name to prefix to extension prefix, final Attributes the attributes of manifest to add to attributes)Add Extension to the specified manifest Attributes. |
| public static Extension[] | Returns: the "available" extensions in specified manifestManifest to be parsed manifest)Return an array of |
| public Compatibility | Returns: the enum indicating the compatibility (or lack thereof) of specified extensionDescription of the required optional package required)Return a Compatibility enum indicating the relationship of this
|
| private static void | getExtension(final Attributes
Attributes to be parsed attributes, final List<Extension> list to add required optional packages to required, final Attributes.the key to use to lookup list, usually EXTENSION_LIST
or OPTIONAL_EXTENSION_LIST listKeyAdd required optional packages defined in the specified attributes entry, if any. |
| private static Extension | Returns: the new Extension object, or nullthe prefix for each attribute name prefix, final Attributes Attributes to searched attributes)Extract an Extension from Attributes. |
| public String | |
| public String | Returns: the url of the extensions implementation.Get the url of the extensions implementation. |
| public String | Returns: the vendor of the extensions implementation.Get the vendor of the extensions implementation. |
| public String | Returns: the vendorID of the extensions implementation.Get the vendorID of the extensions implementation. |
| public DeweyDecimal | Returns: the version of the extensions implementation.Get the version of the extensions implementation. |
| private static Extension[] | Returns: the list of listed extensionsthe manifest to extract extensions from manifest, final Attributes.the key used to get list (Usually
EXTENSION_LIST or OPTIONAL_EXTENSION_LIST) listKeyRetrieve all the extensions listed under a particular key (Usually EXTENSION_LIST or OPTIONAL_EXTENSION_LIST). |
| public static Extension[] | Returns: the optional dependencies that are specified in manifestManifest to be parsed manifest)Return the set of |
| public static Extension[] | Returns: the dependencies that are specified in manifestManifest to be parsed manifest)Return the set of |
| public String | Returns: the vendor of the extensions specification.Get the vendor of the extensions specification. |
| public DeweyDecimal | Returns: the version of the extensions specification.Get the version of the extensions specification. |
| private static String | Returns: the trimmed string or nullthe string to trim or null value)Trim the supplied string if the string is non-null |
| private boolean | isCompatible(final DeweyDecimal
First version number (dotted decimal) first, final DeweyDecimal Second version number (dotted decimal) second)Return |
| public boolean | Returns: true if the specified extension is compatible with this extensionDescription of the required optional package required)Return |
| private static String[] | |
| public String | Returns: string representation of object.Overrides java. |
| COMPATIBLE | back to summary |
|---|---|
| public static final Compatibility COMPATIBLE Enum indicating that extension is compatible with other extension. | |
| EXTENSION_LIST | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for EXTENSION_LIST. | |
| EXTENSION_NAME | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for EXTENSION_NAME. | |
| extensionName | back to summary |
|---|---|
| private String extensionName The name of the optional package being made available, or required. | |
| IMPLEMENTATION_URL | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for IMPLEMENTATION_URL. | |
| IMPLEMENTATION_VENDOR | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for IMPLEMENTATION_VENDOR. | |
| IMPLEMENTATION_VENDOR_ID | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for IMPLEMENTATION_VENDOR_ID. | |
| IMPLEMENTATION_VERSION | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for IMPLEMENTATION_VERSION. | |
| implementationURL | back to summary |
|---|---|
| private String implementationURL The URL from which the most recent version of this optional package can be obtained if it is not already installed. | |
| implementationVendor | back to summary |
|---|---|
| private String implementationVendor The name of the company or organization that produced this implementation of this optional package. | |
| implementationVendorID | back to summary |
|---|---|
| private String implementationVendorID The unique identifier of the company that produced the optional package contained in this JAR file. | |
| implementationVersion | back to summary |
|---|---|
| private DeweyDecimal implementationVersion The version number (dotted decimal notation) for this implementation of the optional package. | |
| INCOMPATIBLE | back to summary |
|---|---|
| public static final Compatibility INCOMPATIBLE Enum indicating that extension is incompatible with other extension in ways other than other enums indicate). For example the other extension may have a different ID. | |
| OPTIONAL_EXTENSION_LIST | back to summary |
|---|---|
| public static final Attributes.
| |
| REQUIRE_IMPLEMENTATION_UPGRADE | back to summary |
|---|---|
| public static final Compatibility REQUIRE_IMPLEMENTATION_UPGRADE Enum indicating that extension requires an upgrade of implementation to be compatible with other extension. | |
| REQUIRE_SPECIFICATION_UPGRADE | back to summary |
|---|---|
| public static final Compatibility REQUIRE_SPECIFICATION_UPGRADE Enum indicating that extension requires an upgrade of specification to be compatible with other extension. | |
| REQUIRE_VENDOR_SWITCH | back to summary |
|---|---|
| public static final Compatibility REQUIRE_VENDOR_SWITCH Enum indicating that extension requires a vendor switch to be compatible with other extension. | |
| SPECIFICATION_VENDOR | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for SPECIFICATION_VENDOR. | |
| SPECIFICATION_VERSION | back to summary |
|---|---|
| public static final Attributes. Manifest Attribute Name object for SPECIFICATION_VERSION. | |
| specificationVendor | back to summary |
|---|---|
| private String specificationVendor The name of the company or organization that originated the specification to which this optional package conforms. | |
| specificationVersion | back to summary |
|---|---|
| private DeweyDecimal specificationVersion The version number (dotted decimal notation) of the specification to which this optional package conforms. | |
| Extension | back to summary |
|---|---|
| public Extension(final String extensionName, final String specificationVersion, final String specificationVendor, final String implementationVersion, final String implementationVendor, final String implementationVendorId, final String implementationURL) The constructor to create Extension object. Note that every component is allowed to be specified but only the extensionName is mandatory.
| |
| addExtension | back to summary |
|---|---|
| public static void addExtension(final Extension extension, final Attributes attributes) Add Extension to the specified manifest Attributes.
| |
| addExtension | back to summary |
|---|---|
| public static void addExtension(final Extension extension, final String prefix, final Attributes attributes) Add Extension to the specified manifest Attributes. Use the specified prefix so that dependencies can added with a prefix such as "java3d-" etc.
| |
| getAvailable | back to summary |
|---|---|
| public static Extension[] getAvailable(final Manifest manifest) Return an array of | |
| getCompatibilityWith | back to summary |
|---|---|
| public Compatibility getCompatibilityWith(final Extension required) Return a Compatibility enum indicating the relationship of this
| |
| getExtension | back to summary |
|---|---|
| private static void getExtension(final Attributes attributes, final List<Extension> required, final Attributes. Add required optional packages defined in the specified attributes entry, if any.
| |
| getExtension | back to summary |
|---|---|
| private static Extension getExtension(final String prefix, final Attributes attributes) Extract an Extension from Attributes. Prefix indicates the prefix checked for each string. Usually the prefix is "<extension>-" if looking for a Required extension. If you are looking for an Available extension then the prefix is "".
| |
| getExtensionName | back to summary |
|---|---|
| public String getExtensionName() Get the name of the extension.
| |
| getImplementationURL | back to summary |
|---|---|
| public String getImplementationURL() Get the url of the extensions implementation.
| |
| getImplementationVendor | back to summary |
|---|---|
| public String getImplementationVendor() Get the vendor of the extensions implementation.
| |
| getImplementationVendorID | back to summary |
|---|---|
| public String getImplementationVendorID() Get the vendorID of the extensions implementation.
| |
| getImplementationVersion | back to summary |
|---|---|
| public DeweyDecimal getImplementationVersion() Get the version of the extensions implementation.
| |
| getListed | back to summary |
|---|---|
| private static Extension[] getListed(final Manifest manifest, final Attributes. Retrieve all the extensions listed under a particular key (Usually EXTENSION_LIST or OPTIONAL_EXTENSION_LIST).
| |
| getOptions | back to summary |
|---|---|
| public static Extension[] getOptions(final Manifest manifest) Return the set of | |
| getRequired | back to summary |
|---|---|
| public static Extension[] getRequired(final Manifest manifest) Return the set of | |
| getSpecificationVendor | back to summary |
|---|---|
| public String getSpecificationVendor() Get the vendor of the extensions specification.
| |
| getSpecificationVersion | back to summary |
|---|---|
| public DeweyDecimal getSpecificationVersion() Get the version of the extensions specification.
| |
| getTrimmedString | back to summary |
|---|---|
| private static String getTrimmedString(final String value) Trim the supplied string if the string is non-null | |
| isCompatible | back to summary |
|---|---|
| private boolean isCompatible(final DeweyDecimal first, final DeweyDecimal second) Return
| |
| isCompatibleWith | back to summary |
|---|---|
| public boolean isCompatibleWith(final Extension required) Return
| |
| split | back to summary |
|---|---|
| private static String[] split(final String string, final String onToken) Splits the string on every token into an array of strings. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return a String representation of this object. | |