Class Manifest.Attribute

java.lang.Object
org.codehaus.plexus.archiver.jar.Manifest.BaseAttribute
org.codehaus.plexus.archiver.jar.Manifest.Attribute
All Implemented Interfaces:
Iterable<String>
Direct Known Subclasses:
Manifest.ExistingAttribute
Enclosing class:
Manifest

public static class Manifest.Attribute extends Manifest.BaseAttribute implements Iterable<String>
An attribute for the manifest. Those attributes that are not nested into a section will be added to the "Main" section.
  • Constructor Details

    • Attribute

      public Attribute()
      Construct an empty attribute
    • Attribute

      public Attribute(String name, String value)
      Construct a manifest by specifying its name and value
      Parameters:
      name - the attribute's name
      value - the Attribute's value
  • Method Details

    • iterator

      public Iterator<String> iterator()
      Specified by:
      iterator in interface Iterable<String>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Manifest.BaseAttribute
      See Also:
    • equals

      public boolean equals(Object rhs)
      Overrides:
      equals in class Manifest.BaseAttribute
      See Also:
    • setName

      public void setName(String name)
      Set the Attribute's name; required
      Parameters:
      name - the attribute's name
    • getKey

      public String getKey()
      Get the attribute's Key - its name in lower case.
      Returns:
      the attribute's key.
    • setValue

      public void setValue(String value)
      Set the Attribute's value; required
      Parameters:
      value - the attribute's value
    • getValue

      public String getValue()
      Get the Attribute's value.
      Returns:
      the attribute's value.
    • addValue

      public void addValue(String value)
      Add a new value to this attribute - making it multivalued.
      Parameters:
      value - the attribute's additional value