org.apache.commons.launcher.types
Class ConditionalArgument
public
class
ConditionalArgument
extends 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
Method Summary |
String | getIf()
Get the "if" condition flag.
|
String[] | getParts()
Get a single command line argument.
|
String | getUnless()
Get the "unless" condition flag.
|
void | setFile(File file)
Set a single command line argument to the absolute
filename of the specified file.
|
void | setIf(String property)
Set the "if" condition. |
void | setLine(String line)
Set a line to split into several command line arguments.
|
void | setPath(Path path)
Set a single command line argument and treat it like a path. |
void | setUnless(String property)
Set the "unless" condition. |
void | setValue(String value)
Set a single command line argument.
|
public String getIf()
Get the "if" condition flag.
Returns: the "if" condition flag
public String[] getParts()
Get a single command line argument.
Returns: a single command line argument
public String getUnless()
Get the "unless" condition flag.
Returns: the "unless" condition flag
public void setFile(File file)
Set a single command line argument to the absolute
filename of the specified file.
Parameters: file a single command line argument
public void setIf(String property)
Set the "if" condition. Tasks that nest this class as an element
should evaluate this flag in their org.apache.tools.ant.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
public void setLine(String line)
Set a line to split into several command line arguments.
Parameters: line line to split into several commandline arguments
public void setPath(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
public void setUnless(String property)
Set the "unless" condition. Tasks that nest this class as an element
should evaluate this flag in their org.apache.tools.ant.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
public void setValue(String value)
Set a single command line argument.
Parameters: value a single command line argument
Copyright (c) 2001-2002 - Apache Software Foundation