org.apache.commons.launcher.types
Class ConditionalArgument
java.lang.Object
|
+--org.apache.tools.ant.ProjectComponent
|
+--org.apache.tools.ant.types.DataType
|
+--org.apache.commons.launcher.types.ConditionalArgument
- 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
Fields inherited from class org.apache.tools.ant.types.DataType |
checked, description, ref |
Fields inherited from class org.apache.tools.ant.ProjectComponent |
project |
Method Summary |
java.lang.String |
getIf()
Get the "if" condition flag. |
java.lang.String[] |
getParts()
Get a single command line argument. |
java.lang.String |
getUnless()
Get the "unless" condition flag. |
void |
setFile(java.io.File file)
Set a single command line argument to the absolute
filename of the specified file. |
void |
setIf(java.lang.String property)
Set the "if" condition. |
void |
setLine(java.lang.String line)
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 |
setUnless(java.lang.String property)
Set the "unless" condition. |
void |
setValue(java.lang.String value)
Set a single command line argument. |
Methods inherited from class org.apache.tools.ant.types.DataType |
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, getCheckedRef, getDescription, getRefid, isChecked, isReference, noChildrenAllowed, setChecked, setDescription, setRefid, tooManyAttributes |
Methods inherited from class org.apache.tools.ant.ProjectComponent |
getProject, log, log, setProject |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ConditionalArgument
public ConditionalArgument()
getIf
public java.lang.String getIf()
- Get the "if" condition flag.
- Returns:
- the "if" condition flag
getParts
public java.lang.String[] getParts()
- Get a single command line argument.
- Returns:
- a single command line argument
getUnless
public java.lang.String getUnless()
- Get the "unless" condition flag.
- Returns:
- the "unless" condition flag
setFile
public void setFile(java.io.File file)
- Set a single command line argument to the absolute
filename of the specified file.
- Parameters:
file
- a single command line argument
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 their
Task.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
public void setLine(java.lang.String line)
- 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
public void setUnless(java.lang.String property)
- Set the "unless" condition. Tasks that nest this class as an element
should evaluate this flag in their
Task.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 a single command line argument.
- Parameters:
value
- a single command line argument
Copyright (c) 2001-2002 - Apache Software Foundation