org.apache.tools.ant.types
Class EnumeratedAttribute
java.lang.Object
|
+--org.apache.tools.ant.types.EnumeratedAttribute
- Direct Known Subclasses:
- Mapper.MapperType
- public abstract class EnumeratedAttribute
- extends java.lang.Object
Helper class for attributes that can only take one of a fixed list
of values.
See FixCRLF
for an
example.
Field Summary |
protected java.lang.String |
value
|
Method Summary |
boolean |
containsValue(java.lang.String value)
Is this value included in the enumeration? |
java.lang.String |
getValue()
Retrieves the value. |
abstract java.lang.String[] |
getValues()
This is the only method a subclass needs to implement. |
void |
setValue(java.lang.String value)
Invoked by IntrospectionHelper . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
value
protected java.lang.String value
EnumeratedAttribute
public EnumeratedAttribute()
getValues
public abstract java.lang.String[] getValues()
- This is the only method a subclass needs to implement.
- Returns:
- an array holding all possible values of the enumeration.
setValue
public final void setValue(java.lang.String value)
throws BuildException
- Invoked by
IntrospectionHelper
.
containsValue
public final boolean containsValue(java.lang.String value)
- Is this value included in the enumeration?
getValue
public final java.lang.String getValue()
- Retrieves the value.
Includes only those classes commonly used by task writers. The Ant 1.4.1 distribution includes complete Javadoc for all classes included in Ant, though in most cases these are not intended as APIs.