org.apache.commons.launcher.types
Class ConditionalVariable

java.lang.Object
  |
  +--org.apache.tools.ant.ProjectComponent
        |
        +--org.apache.tools.ant.types.DataType
              |
              +--org.apache.commons.launcher.types.ConditionalVariable

public class ConditionalVariable
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, description, ref
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
ConditionalVariable()
           
 
Method Summary
 java.lang.String getIf()
          Get the "if" condition flag.
 java.lang.String getKey()
          Get the key.
 java.lang.String getUnless()
          Get the "unless" condition flag.
 java.lang.String getValue()
          Get the value.
 void setFile(java.io.File file)
          Set the value to a File.
 void setFile(org.apache.tools.ant.types.Path path)
          Set the value to a Path.
 void setIf(java.lang.String property)
          Set the "if" condition.
 void setKey(java.lang.String key)
          Set the key.
 void setPath(org.apache.tools.ant.types.Path path)
          Set the value to a Path.
 void setUnless(java.lang.String property)
          Set the "unless" condition.
 void setValue(java.lang.String value)
          Set the value.
 
Methods inherited from class org.apache.tools.ant.types.DataType
circularReference, dieOnCircularReference, getCheckedRef, getDescription, isReference, noChildrenAllowed, 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
 

Constructor Detail

ConditionalVariable

public ConditionalVariable()
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 a File.


setPath

public void setPath(org.apache.tools.ant.types.Path path)
Set the value to a Path.


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:

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 a Path.


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:

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


Copyright (c) 2001-2002 - Apache Software Foundation