net.sf.antcontrib.cpptasks.types

Class ConditionalPath

Known Direct Subclasses:
IncludePath, SystemIncludePath

public class ConditionalPath
extends Path

An Ant Path object augmented with if and unless conditionals
Author:
Curt Arnold

Constructor Summary

ConditionalPath(Project project)
ConditionalPath(Project p, String path)

Method Summary

boolean
isActive(org.apache.tools.ant.Project p)
Returns true if the Path's if and unless conditions (if any) are satisfied.
void
setIf(String propName)
Sets the property name for the 'if' condition.
void
setUnless(String propName)
Set the property name for the 'unless' condition.

Constructor Details

ConditionalPath

public ConditionalPath(Project project)

ConditionalPath

public ConditionalPath(Project p,
                       String path)

Method Details

isActive

public boolean isActive(org.apache.tools.ant.Project p)
            throws BuildException
Returns true if the Path's if and unless conditions (if any) are satisfied.

setIf

public void setIf(String propName)
Sets the property name for the 'if' condition. The path will be ignored unless the property is defined. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") will throw an exception when evaluated.
Parameters:
propName - property name

setUnless

public void setUnless(String propName)
Set the property name for the 'unless' condition. If named property is set, the path will be ignored. The value of the property is insignificant, but values that would imply misinterpretation ("false", "no") of the behavior will throw an exception when evaluated.
Parameters:
propName - name of property

Copyright B) 2001-2006 Ant-Contrib project. All Rights Reserved.