Class ManifestAttributes

java.lang.Object
io.quarkus.paths.ManifestAttributes

public class ManifestAttributes extends Object
Manifests for some libraries can be quite large (e.g. for commons-codec, it is 21 KB).

Given we keep a lot of ArchivePathTree around, it seems like a good idea to only keep around the Manifest entries that we actually use in Quarkus.

This can be extended further in the future if we need more attributes.

  • Method Details

    • of

      public static ManifestAttributes of(Manifest manifest)
      Returns the manifest attributes for the given manifest, or null if the given value is null.
      Parameters:
      manifest - the manifest
      Returns:
      the manifest attributes for the given manifest, or null if the given value is null
    • getSpecificationTitle

      public String getSpecificationTitle()
      Returns the value of the Specification-Title attribute, or null if it is absent.
      Returns:
      the value of the Specification-Title attribute, or null if it is absent
    • getSpecificationVersion

      public String getSpecificationVersion()
      Returns the value of the Specification-Version attribute, or null if it is absent.
      Returns:
      the value of the Specification-Version attribute, or null if it is absent
    • getSpecificationVendor

      public String getSpecificationVendor()
      Returns the value of the Specification-Vendor attribute, or null if it is absent.
      Returns:
      the value of the Specification-Vendor attribute, or null if it is absent
    • getImplementationTitle

      public String getImplementationTitle()
      Returns the value of the Implementation-Title attribute, or null if it is absent.
      Returns:
      the value of the Implementation-Title attribute, or null if it is absent
    • getImplementationVersion

      public String getImplementationVersion()
      Returns the value of the Implementation-Version attribute, or null if it is absent.
      Returns:
      the value of the Implementation-Version attribute, or null if it is absent
    • getImplementationVendor

      public String getImplementationVendor()
      Returns the value of the Implementation-Vendor attribute, or null if it is absent.
      Returns:
      the value of the Implementation-Vendor attribute, or null if it is absent
    • isMultiRelease

      public boolean isMultiRelease()
      Returns the value of the Multi-Release attribute, or false if it is absent.
      Returns:
      the value of the Multi-Release attribute, or false if it is absent
    • automaticModuleName

      public String automaticModuleName()
      Returns the value of the Automatic-Module-Name attribute, or null if it is absent.
      Returns:
      the value of the Automatic-Module-Name attribute, or null if it is absent
    • mainClassName

      public String mainClassName()
      Returns the value of the Main-Class attribute, or null if it is absent.
      Returns:
      the value of the Main-Class attribute, or null if it is absent
    • addExports

      public Map<String,Set<String>> addExports()
      Returns the parsed value of the Add-Exports attribute, or an empty map if it is absent. The returned map keys represent the module to export from, and the values represent the corresponding package sets to export from each module. The returned map is immutable and contains no null keys or values.
      Returns:
      the parsed value of the Add-Exports attribute, or an empty map if it is absent
    • addOpens

      public Map<String,Set<String>> addOpens()
      Returns the parsed value of the Add-Opens attribute, or an empty map if it is absent. The returned map keys represent the module to open from, and the values represent the corresponding package sets to open from each module. The returned map is immutable and contains no null keys or values.
      Returns:
      the parsed value of the Add-Opens attribute, or an empty map if it is absent
    • enableNativeAccess

      public boolean enableNativeAccess()
      Returns true if the value of the Enable-Native-Access attribute is present and equal to ALL-UNNAMED or false otherwise.
      Returns:
      true if the value of the Enable-Native-Access attribute is present and equal to ALL-UNNAMED or false otherwise