org.apache.commons.launcher.types
Class ConditionalVariable
public
class
ConditionalVariable
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 | getKey()
Get the key.
|
String | getUnless()
Get the "unless" condition flag.
|
String | getValue()
Get the value.
|
void | setFile(File file)
Set the value to a File.
|
void | setFile(Path path)
Set the value to a Path.
|
void | setIf(String property)
Set the "if" condition. |
void | setKey(String key)
Set the key.
|
void | setPath(Path path)
Set the value to a Path.
|
void | setUnless(String property)
Set the "unless" condition. |
void | setValue(String value)
Set the value.
|
public String getIf()
Get the "if" condition flag.
Returns: the "if" condition flag
public String getKey()
Get the key.
Returns: the key for this variable
public String getUnless()
Get the "unless" condition flag.
Returns: the "unless" condition flag
public String getValue()
Get the value.
Returns: the value for this variable
public void setFile(File file)
Set the value to a File.
Parameters: value the File for this variable
public void setFile(Path path)
Set the value to a Path.
Parameters: value the Path for this variable
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 setKey(String key)
Set the key.
Parameters: key the key for this variable
public void setPath(Path path)
Set the value to a Path.
Parameters: value the Path for this variable
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 the value.
Parameters: value the value for this variable
Copyright (c) 2001-2002 - Apache Software Foundation