Package org.apache.tools.ant.taskdefs
Class Manifest.Attribute
java.lang.Object
org.apache.tools.ant.taskdefs.Manifest.Attribute
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddContinuation(String line) Add a continuation line from the Manifest file.voidAdd a new value to this attribute - making it multivalued.booleangetKey()Get the attribute's Key - its name in lower case.getName()Get the Attribute's namegetValue()Get the Attribute's value.Get all the attribute's values.inthashCode()voidParse a line into name and value pairsvoidSet the Attribute's name; requiredvoidSet the Attribute's value; requiredvoidwrite(PrintWriter writer) Write the attribute out to a print writer without flattening multi-values attributes (i.e.voidwrite(PrintWriter writer, boolean flatten) Write the attribute out to a print writer.
- 
Constructor Details- 
Attributepublic Attribute()Construct an empty attribute
- 
AttributeConstruct an attribute by parsing a line from the Manifest- Parameters:
- line- the line containing the attribute name and value
- Throws:
- ManifestException- if the line is not valid
 
- 
Attribute
 
- 
- 
Method Details- 
hashCode
- 
equals
- 
parseParse a line into name and value pairs- Parameters:
- line- the line to be parsed
- Throws:
- ManifestException- if the line does not contain a colon separating the name and value
 
- 
setNameSet the Attribute's name; required- Parameters:
- name- the attribute's name
 
- 
getName
- 
getKeyGet the attribute's Key - its name in lower case.- Returns:
- the attribute's key.
 
- 
setValueSet the Attribute's value; required- Parameters:
- value- the attribute's value
 
- 
getValue
- 
addValueAdd a new value to this attribute - making it multivalued.- Parameters:
- value- the attribute's additional value
 
- 
getValuesGet all the attribute's values.- Returns:
- an enumeration of the attributes values
 
- 
addContinuationAdd a continuation line from the Manifest file. When lines are too long in a manifest, they are continued on the next line by starting with a space. This method adds the continuation data to the attribute value by skipping the first character.- Parameters:
- line- the continuation line.
 
- 
writeWrite the attribute out to a print writer without flattening multi-values attributes (i.e. Class-Path).- Parameters:
- writer- the Writer to which the attribute is written
- Throws:
- IOException- if the attribute value cannot be written
 
- 
writeWrite the attribute out to a print writer.- Parameters:
- writer- the Writer to which the attribute is written
- flatten- whether to collapse multi-valued attributes (i.e. potentially Class-Path) Class-Path into a single attribute.
- Throws:
- IOException- if the attribute value cannot be written
- Since:
- Ant 1.8.0
 
 
-