Class ConditionalVariable
- java.lang.Object
-
- org.apache.tools.ant.ProjectComponent
-
- org.apache.tools.ant.types.DataType
-
- org.apache.commons.launcher.types.ConditionalVariable
-
- All Implemented Interfaces:
java.lang.Cloneable
public class ConditionalVariable extends org.apache.tools.ant.types.DataTypeA class that represents nestedor elements. This class provides the same functionality as the class that represents these same elements in a "java" task. In addition, this class supports conditional "if" and "unless" attributes. - Author:
- Patrick Luby
-
-
Constructor Summary
Constructors Constructor Description ConditionalVariable()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetIf()Get the "if" condition flag.java.lang.StringgetKey()Get the key.java.lang.StringgetUnless()Get the "unless" condition flag.java.lang.StringgetValue()Get the value.voidsetFile(java.io.File file)Set the value to aFile.voidsetFile(org.apache.tools.ant.types.Path path)Set the value to aPath.voidsetIf(java.lang.String property)Set the "if" condition.voidsetKey(java.lang.String key)Set the key.voidsetPath(org.apache.tools.ant.types.Path path)Set the value to aPath.voidsetUnless(java.lang.String property)Set the "unless" condition.voidsetValue(java.lang.String value)Set the value.-
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, clone, dieOnCircularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, setRefid, tooManyAttributes, toString
-
-
-
-
Method Detail
-
getIf
public java.lang.String getIf()
Get the "if" condition flag.- Returns:
- the "if" condition flag
-
getKey
public java.lang.String getKey()
Get the key.- Returns:
- the key for this variable
-
getUnless
public java.lang.String getUnless()
Get the "unless" condition flag.- Returns:
- the "unless" condition flag
-
getValue
public java.lang.String getValue()
Get the value.- Returns:
- the value for this variable
-
setFile
public void setFile(java.io.File file)
Set the value to aFile.- Parameters:
value- theFilefor this variable
-
setPath
public void setPath(org.apache.tools.ant.types.Path path)
Set the value to aPath.- Parameters:
value- thePathfor this variable
-
setIf
public void setIf(java.lang.String property)
Set the "if" condition. Tasks that nest this class as an element should evaluate this flag in theirTask.execute()method. If the following conditions are true, the task should process this element:- The flag is neither null nor a empty string
- The property that the flag resolves to after macro substitution
is defined
- Parameters:
property- a property name or macro
-
setKey
public void setKey(java.lang.String key)
Set the key.- Parameters:
key- the key for this variable
-
setFile
public void setFile(org.apache.tools.ant.types.Path path)
Set the value to aPath.- Parameters:
value- thePathfor this variable
-
setUnless
public void setUnless(java.lang.String property)
Set the "unless" condition. Tasks that nest this class as an element should evaluate this flag in theirTask.execute()method. If the following conditions are true, the task should ignore this element:- The flag is neither null nor a empty string
- The property that the flag resolves to after macro substitution
is defined
- Parameters:
property- a property name or macro
-
setValue
public void setValue(java.lang.String value)
Set the value.- Parameters:
value- the value for this variable
-
-