org.apache.tools.ant.types
Class EnumeratedAttribute
java.lang.Object
|
+--org.apache.tools.ant.types.EnumeratedAttribute
- Direct Known Subclasses:
- Echo.EchoLevel, ExecuteOn.FileDirBoth, FixCRLF.AddAsisRemove, FormatterElement.TypeAttribute, Mapper.MapperType, PropertyFile.Entry.Operation, PropertyFile.Entry.Type, SQLExec.OnError
- 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.
- Author:
- Stefan Bodewig
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.
Copyright ? 2000 Apache Software Foundation. All Rights Reserved.