Prior to JDK1.3, an "Optional Package" was known as an Extension. The specification for this mechanism is available in the JDK1.3 documentation in the directory $JDK_HOME/docs/guide/extensions/versioning.html. Alternatively it is available online at https://docs.oracle.com/javase/8/docs/technotes/guides/extensions/versioning.html.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | CREATED_BY
"Created-By" string used when creating manifest. |
| private final List | dependencies
ExtensionAdapter objects representing dependencies required by library. |
| private File | destFile
The library to display information about. |
| private Extension | extension
The extension supported by this library (if any). |
| private final List | extraAttributes
Extra attributes the user specifies for main section in manifest. |
| private static final String | MANIFEST_VERSION
Version of manifest spec that task generates. |
| private final List | optionals
ExtensionAdapter objects representing optional dependencies required by library. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | addConfiguredAttribute(final ExtraAttribute
an attribute that is to be put in main section of manifest. attribute)Adds an attribute that is to be put in main section of manifest. |
| public void | addConfiguredDepends(final ExtensionSet
a set of extensions that this library requires. extensionSet)Adds a set of extensions that this library requires. |
| public void | addConfiguredExtension(final ExtensionAdapter
an extension that this library implements. extensionAdapter)Adds an extension that this library implements. |
| public void | addConfiguredOptions(final ExtensionSet
a set of extensions that this library optionally requires. extensionSet)Adds a set of extensions that this library optionally requires. |
| private void | appendExtensionList(final Attributes
the attributes to add key-value to attributes, final Attributes.the key to use extensionKey,the prefix for all libraries listPrefix, final int the number of libraries to list size)Append an attribute such as "Extension-List: lib0 lib1 lib2" using specified prefix and counting up to specified size. |
| private void | appendExtraAttributes(final Attributes
the manifest section to write
attributes to attributes)Add any extra attributes to the manifest. |
| private void | appendLibraryList(final Attributes
the attributes to add extensions to attributes, final String listPrefix, final List<Extension> the list of extensions extensions)Append specified extensions to specified attributes. |
| public void | |
| public void | setDestfile(final File
The location where generated manifest is placed. destFile)The location where generated manifest is placed. |
| private List | toExtensions(final List<ExtensionSet>
the list of ExtensionSets to add to list extensionSets)Convert a list of ExtensionSet objects to extensions. |
| private void | |
| private void |
| CREATED_BY | back to summary |
|---|---|
| private static final String CREATED_BY "Created-By" string used when creating manifest. | |
| dependencies | back to summary |
|---|---|
| private final List<ExtensionSet> dependencies ExtensionAdapter objects representing dependencies required by library. | |
| destFile | back to summary |
|---|---|
| private File destFile The library to display information about. | |
| extension | back to summary |
|---|---|
| private Extension extension The extension supported by this library (if any). | |
| extraAttributes | back to summary |
|---|---|
| private final List<ExtraAttribute> extraAttributes Extra attributes the user specifies for main section in manifest. | |
| MANIFEST_VERSION | back to summary |
|---|---|
| private static final String MANIFEST_VERSION Version of manifest spec that task generates. | |
| optionals | back to summary |
|---|---|
| private final List<ExtensionSet> optionals ExtensionAdapter objects representing optional dependencies required by library. | |
| JarLibManifestTask | back to summary |
|---|---|
| public JarLibManifestTask() | |
| addConfiguredAttribute | back to summary |
|---|---|
| public void addConfiguredAttribute(final ExtraAttribute attribute) Adds an attribute that is to be put in main section of manifest.
| |
| addConfiguredDepends | back to summary |
|---|---|
| public void addConfiguredDepends(final ExtensionSet extensionSet) Adds a set of extensions that this library requires.
| |
| addConfiguredExtension | back to summary |
|---|---|
| public void addConfiguredExtension(final ExtensionAdapter extensionAdapter) throws BuildException Adds an extension that this library implements.
| |
| addConfiguredOptions | back to summary |
|---|---|
| public void addConfiguredOptions(final ExtensionSet extensionSet) Adds a set of extensions that this library optionally requires.
| |
| appendExtensionList | back to summary |
|---|---|
| private void appendExtensionList(final Attributes attributes, final Attributes. Append an attribute such as "Extension-List: lib0 lib1 lib2" using specified prefix and counting up to specified size. Also use specified extensionKey so that can generate list of optional dependencies as well.
| |
| appendExtraAttributes | back to summary |
|---|---|
| private void appendExtraAttributes(final Attributes attributes) Add any extra attributes to the manifest.
| |
| appendLibraryList | back to summary |
|---|---|
| private void appendLibraryList(final Attributes attributes, final String listPrefix, final List<Extension> extensions) throws BuildException Append specified extensions to specified attributes. Use the extensionKey to list the extensions, usually "Extension-List:" for required dependencies and "Optional-Extension-List:" for optional dependencies. Note "Optional" dependencies are not part of the specification.
| |
| execute | back to summary |
|---|---|
| public void execute() throws BuildException Overrides org. Execute the task.
| |
| setDestfile | back to summary |
|---|---|
| public void setDestfile(final File destFile) The location where generated manifest is placed.
| |
| toExtensions | back to summary |
|---|---|
| private List Convert a list of ExtensionSet objects to extensions.
| |
| validate | back to summary |
|---|---|
| private void validate() throws BuildException Validate the tasks parameters.
| |
| writeManifest | back to summary |
|---|---|
| private void writeManifest(final Manifest manifest) throws IOException Write out manifest to destfile.
| |