Class ConditionalPath
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.Path
net.sf.antcontrib.cpptasks.types.ConditionalPath
- All Implemented Interfaces:
Cloneable, Iterable<org.apache.tools.ant.types.Resource>, org.apache.tools.ant.types.ResourceCollection
- Direct Known Subclasses:
IncludePath, SystemIncludePath
public class ConditionalPath
extends org.apache.tools.ant.types.Path
An Ant Path object augmented with if and unless conditionals
- Author:
- Curt Arnold
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.tools.ant.types.Path
org.apache.tools.ant.types.Path.PathElement -
Field Summary
Fields inherited from class org.apache.tools.ant.types.Path
systemBootClasspath, systemClasspathFields inherited from class org.apache.tools.ant.types.DataType
checked, refFields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project -
Constructor Summary
ConstructorsConstructorDescriptionConditionalPath(org.apache.tools.ant.Project project) ConditionalPath(org.apache.tools.ant.Project p, String path) -
Method Summary
Modifier and TypeMethodDescriptionbooleanisActive(org.apache.tools.ant.Project p) Returns true if the Path's if and unless conditions (if any) are satisfied.voidSets the property name for the 'if' condition.voidSet the property name for the 'unless' condition.Methods inherited from class org.apache.tools.ant.types.Path
add, add, addDirset, addExisting, addExisting, addExtdirs, addFilelist, addFileset, addJavaRuntime, append, assertFilesystemOnly, clone, concatSystemBootClasspath, concatSystemClasspath, concatSystemClasspath, createPath, createPathElement, delegateIteratorToList, dieOnCircularReference, isFilesystemOnly, iterator, list, setCache, setLocation, setPath, setRefid, size, toString, translateFile, translateFileSep, translatePathMethods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, dieOnCircularReference, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getCheckedRef, getDataTypeName, getRefid, invokeCircularReferenceCheck, isChecked, isReference, noChildrenAllowed, pushAndInvokeCircularReferenceCheck, setChecked, tooManyAttributesMethods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProjectMethods inherited from class Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface Iterable
forEach, spliteratorMethods inherited from interface org.apache.tools.ant.types.ResourceCollection
isEmpty, stream
-
Constructor Details
-
ConditionalPath
public ConditionalPath(org.apache.tools.ant.Project project) -
ConditionalPath
-
-
Method Details
-
isActive
public boolean isActive(org.apache.tools.ant.Project p) throws org.apache.tools.ant.BuildException Returns true if the Path's if and unless conditions (if any) are satisfied.- Throws:
org.apache.tools.ant.BuildException
-
setIf
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
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
-