Class ConditionalArgument
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.commons.launcher.types.ConditionalArgument
- All Implemented Interfaces:
Cloneable
public class ConditionalArgument
extends org.apache.tools.ant.types.DataType
A class that represents nested or 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
-
Field Summary
Fields inherited from class org.apache.tools.ant.types.DataType
checked, ref
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetIf()
Get the "if" condition flag.String[]
getParts()
Get a single command line argument.Get the "unless" condition flag.void
Set a single command line argument to the absolute filename of the specified file.void
Set the "if" condition.void
Set a line to split into several command line arguments.void
setPath
(org.apache.tools.ant.types.Path path) Set a single command line argument and treat it like a path.void
Set the "unless" condition.void
Set a single command line argument.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
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
-
Constructor Details
-
ConditionalArgument
public ConditionalArgument()
-
-
Method Details
-
getIf
Get the "if" condition flag.- Returns:
- the "if" condition flag
-
getParts
Get a single command line argument.- Returns:
- a single command line argument
-
getUnless
Get the "unless" condition flag.- Returns:
- the "unless" condition flag
-
setFile
Set a single command line argument to the absolute filename of the specified file.- Parameters:
file
- a single command line argument
-
setIf
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
-
setLine
Set a line to split into several command line arguments.- Parameters:
line
- line to split into several commandline arguments
-
setPath
public void setPath(org.apache.tools.ant.types.Path path) Set a single command line argument and treat it like a path. The correct path separator for the platform is used.- Parameters:
path
- a single command line argument
-
setUnless
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
Set a single command line argument.- Parameters:
value
- a single command line argument
-