Class Attributes.Name

java.lang.Object
java.util.jar.Attributes.Name
Enclosing class:
Attributes

public static class Attributes.Name extends Object
The Attributes.Name class represents an attribute name stored in this Map. Valid attribute names are case-insensitive, are restricted to the ASCII characters in the set [0-9a-zA-Z_-], and cannot exceed 70 characters in length. Attribute values can contain any characters and will be UTF8-encoded when written to the output stream. See the JAR File Specification for more information about valid attribute names and values.
Since:
1.2
External Specifications
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Attributes.Name
    Name object for Class-Path manifest attribute.
    static final Attributes.Name
    Name object for Content-Type manifest attribute.
    static final Attributes.Name
    Deprecated.
    Extension mechanism is no longer supported.
    static final Attributes.Name
    Name object for Extension-List manifest attribute used for the extension mechanism that is no longer supported.
    static final Attributes.Name
    Name object for Extension-Name manifest attribute used for the extension mechanism that is no longer supported.
    static final Attributes.Name
    Name object for Implementation-Title manifest attribute used for package versioning.
    static final Attributes.Name
    Deprecated.
    Extension mechanism is no longer supported.
    static final Attributes.Name
    Name object for Implementation-Vendor manifest attribute used for package versioning.
    static final Attributes.Name
    Deprecated.
    Extension mechanism is no longer supported.
    static final Attributes.Name
    Name object for Implementation-Version manifest attribute used for package versioning.
    static final Attributes.Name
    Name object for Main-Class manifest attribute used for launching applications packaged in JAR files.
    static final Attributes.Name
    Name object for Manifest-Version manifest attribute.
    static final Attributes.Name
    Name object for Multi-Release manifest attribute that indicates this is a multi-release JAR file.
    static final Attributes.Name
    Name object for Sealed manifest attribute used for sealing.
    static final Attributes.Name
    Name object for Signature-Version manifest attribute used when signing JAR files.
    static final Attributes.Name
    Name object for Specification-Title manifest attribute used for package versioning.
    static final Attributes.Name
    Name object for Specification-Vendor manifest attribute used for package versioning.
    static final Attributes.Name
    Name object for Specification-Version manifest attribute used for package versioning.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Name(String name)
    Constructs a new attribute name using the given string name.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Compares this attribute name to another for equality.
    int
    Computes the hash value for this attribute name.
    Returns the attribute name as a String.

    Methods declared in class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    Modifier and Type
    Method
    Description
    protected Object
    Answers a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
    protected void
    Deprecated, for removal: This API element is subject to removal in a future version.
    May cause performance issues, deadlocks and hangs.
    final Class<? extends Object>
    Answers the unique instance of java.lang.Class which represents the class of the receiver.
    final void
    Causes one thread which is waiting on the receiver to be made ready to run.
    final void
    Causes all threads which are waiting on the receiver to be made ready to run.
    final void
    Causes the thread which sent this message to be made not ready to run pending some change in the receiver (as indicated by notify or notifyAll).
    final void
    wait(long time)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
    final void
    wait(long time, int frac)
    Causes the thread which sent this message to be made not ready to run either pending some change in the receiver (as indicated by notify or notifyAll) or the expiration of the timeout.
  • Field Details

    • MANIFEST_VERSION

      public static final Attributes.Name MANIFEST_VERSION
      Name object for Manifest-Version manifest attribute. This attribute indicates the version number of the manifest standard to which a JAR file's manifest conforms.
      See Also:
    • SIGNATURE_VERSION

      public static final Attributes.Name SIGNATURE_VERSION
      Name object for Signature-Version manifest attribute used when signing JAR files.
      See Also:
    • CONTENT_TYPE

      public static final Attributes.Name CONTENT_TYPE
      Name object for Content-Type manifest attribute.
    • CLASS_PATH

      public static final Attributes.Name CLASS_PATH
      Name object for Class-Path manifest attribute.
      See Also:
    • MAIN_CLASS

      public static final Attributes.Name MAIN_CLASS
      Name object for Main-Class manifest attribute used for launching applications packaged in JAR files. The Main-Class attribute is used in conjunction with the -jar command-line option of the java application launcher.
    • SEALED

      public static final Attributes.Name SEALED
      Name object for Sealed manifest attribute used for sealing.
      See Also:
    • EXTENSION_LIST

      public static final Attributes.Name EXTENSION_LIST
      Name object for Extension-List manifest attribute used for the extension mechanism that is no longer supported.
    • EXTENSION_NAME

      public static final Attributes.Name EXTENSION_NAME
      Name object for Extension-Name manifest attribute used for the extension mechanism that is no longer supported.
    • EXTENSION_INSTALLATION

      @Deprecated public static final Attributes.Name EXTENSION_INSTALLATION
      Deprecated.
      Extension mechanism is no longer supported.
      Name object for Extension-Installation manifest attribute.
    • IMPLEMENTATION_TITLE

      public static final Attributes.Name IMPLEMENTATION_TITLE
      Name object for Implementation-Title manifest attribute used for package versioning.
    • IMPLEMENTATION_VERSION

      public static final Attributes.Name IMPLEMENTATION_VERSION
      Name object for Implementation-Version manifest attribute used for package versioning.
    • IMPLEMENTATION_VENDOR

      public static final Attributes.Name IMPLEMENTATION_VENDOR
      Name object for Implementation-Vendor manifest attribute used for package versioning.
    • IMPLEMENTATION_VENDOR_ID

      @Deprecated public static final Attributes.Name IMPLEMENTATION_VENDOR_ID
      Deprecated.
      Extension mechanism is no longer supported.
      Name object for Implementation-Vendor-Id manifest attribute.
    • IMPLEMENTATION_URL

      @Deprecated public static final Attributes.Name IMPLEMENTATION_URL
      Deprecated.
      Extension mechanism is no longer supported.
      Name object for Implementation-URL manifest attribute.
    • SPECIFICATION_TITLE

      public static final Attributes.Name SPECIFICATION_TITLE
      Name object for Specification-Title manifest attribute used for package versioning.
    • SPECIFICATION_VERSION

      public static final Attributes.Name SPECIFICATION_VERSION
      Name object for Specification-Version manifest attribute used for package versioning.
    • SPECIFICATION_VENDOR

      public static final Attributes.Name SPECIFICATION_VENDOR
      Name object for Specification-Vendor manifest attribute used for package versioning.
    • MULTI_RELEASE

      public static final Attributes.Name MULTI_RELEASE
      Name object for Multi-Release manifest attribute that indicates this is a multi-release JAR file.
      Since:
      9
  • Constructor Details

    • Name

      public Name(String name)
      Constructs a new attribute name using the given string name.
      Parameters:
      name - the attribute string name
      Throws:
      IllegalArgumentException - if the attribute name was invalid
      NullPointerException - if the attribute name was null
  • Method Details

    • equals

      public boolean equals(Object o)
      Compares this attribute name to another for equality.
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare
      Returns:
      true if this attribute name is equal to the specified attribute object
      See Also:
    • hashCode

      public int hashCode()
      Computes the hash value for this attribute name.
      Overrides:
      hashCode in class Object
      Returns:
      the receiver's hash.
      See Also:
    • toString

      public String toString()
      Returns the attribute name as a String.
      Overrides:
      toString in class Object
      Returns:
      String a printable representation for the receiver.