|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.tools.ant.taskdefs.Manifest.Attribute
public static class Manifest.Attribute
An attribute for the manifest. Those attributes that are not nested into a section will be added to the "Main" section.
Constructor Summary | |
---|---|
Manifest.Attribute()
Construct an empty attribute |
|
Manifest.Attribute(java.lang.String line)
Construct an attribute by parsing a line from the Manifest |
|
Manifest.Attribute(java.lang.String name,
java.lang.String value)
Construct a manifest by specifying its name and value |
Method Summary | |
---|---|
void |
addContinuation(java.lang.String line)
Add a continuation line from the Manifest file. |
void |
addValue(java.lang.String value)
Add a new value to this attribute - making it multivalued. |
boolean |
equals(java.lang.Object rhs)
|
java.lang.String |
getKey()
Get the attribute's Key - its name in lower case. |
java.lang.String |
getName()
Get the Attribute's name |
java.lang.String |
getValue()
Get the Attribute's value. |
java.util.Enumeration |
getValues()
Get all the attribute's values. |
int |
hashCode()
|
void |
parse(java.lang.String line)
Parse a line into name and value pairs |
void |
setName(java.lang.String name)
Set the Attribute's name; required |
void |
setValue(java.lang.String value)
Set the Attribute's value; required |
void |
write(java.io.PrintWriter writer)
Write the attribute out to a print writer without flattening multi-values attributes (i.e. |
void |
write(java.io.PrintWriter writer,
boolean flatten)
Write the attribute out to a print writer. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Manifest.Attribute()
public Manifest.Attribute(java.lang.String line) throws ManifestException
line
- the line containing the attribute name and value
ManifestException
- if the line is not validpublic Manifest.Attribute(java.lang.String name, java.lang.String value)
name
- the attribute's namevalue
- the Attribute's valueMethod Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean equals(java.lang.Object rhs)
equals
in class java.lang.Object
rhs
- the object to check for equality.
Object.equals(java.lang.Object)
public void parse(java.lang.String line) throws ManifestException
line
- the line to be parsed
ManifestException
- if the line does not contain a colon
separating the name and valuepublic void setName(java.lang.String name)
name
- the attribute's namepublic java.lang.String getName()
public java.lang.String getKey()
public void setValue(java.lang.String value)
value
- the attribute's valuepublic java.lang.String getValue()
public void addValue(java.lang.String value)
value
- the attribute's additional valuepublic java.util.Enumeration getValues()
public void addContinuation(java.lang.String line)
line
- the continuation line.public void write(java.io.PrintWriter writer) throws java.io.IOException
writer
- the Writer to which the attribute is written
java.io.IOException
- if the attribute value cannot be writtenpublic void write(java.io.PrintWriter writer, boolean flatten) throws java.io.IOException
writer
- the Writer to which the attribute is writtenflatten
- whether to collapse multi-valued attributes
(i.e. potentially Class-Path) Class-Path into a
single attribute.
java.io.IOException
- if the attribute value cannot be written
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |