Package net.sf.antcontrib.cpptasks.types
Class ConditionalFileSet
java.lang.Object
org.apache.tools.ant.ProjectComponent
org.apache.tools.ant.types.DataType
org.apache.tools.ant.types.AbstractFileSet
org.apache.tools.ant.types.FileSet
net.sf.antcontrib.cpptasks.types.ConditionalFileSet
- All Implemented Interfaces:
Cloneable
,Iterable<org.apache.tools.ant.types.Resource>
,org.apache.tools.ant.types.ResourceCollection
,org.apache.tools.ant.types.selectors.SelectorContainer
public class ConditionalFileSet
extends org.apache.tools.ant.types.FileSet
An Ant FileSet object augmented with if and unless conditions.
-
Field Summary
FieldsFields inherited from class org.apache.tools.ant.types.DataType
checked, ref
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute()
protected org.apache.tools.ant.types.AbstractFileSet
getRef
(org.apache.tools.ant.Project p) overrides FileSet's implementation which would throw an exception since the referenced object isn't this type.boolean
isActive()
Returns true if the Path's if and unless conditions (if any) are satisfied.void
Sets the property name for the 'if' condition.void
Set the property name for the 'unless' condition.Methods inherited from class org.apache.tools.ant.types.FileSet
clone, isFilesystemOnly, iterator, size
Methods inherited from class org.apache.tools.ant.types.AbstractFileSet
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addExecutable, addFilename, addMajority, addModified, addNone, addNot, addOr, addOwnedBy, addPosixGroup, addPosixPermissions, addPresent, addReadable, addSelector, addSize, addSymlink, addType, addWritable, appendExcludes, appendIncludes, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, dieOnCircularReference, getDefaultexcludes, getDir, getDir, getDirectoryScanner, getDirectoryScanner, getErrorOnMissingDir, getMaxLevelsOfSymlinks, getSelectors, hasPatterns, hasSelectors, isCaseSensitive, isFollowSymlinks, mergeExcludes, mergeIncludes, mergePatterns, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setDir, setErrorOnMissingDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setMaxLevelsOfSymlinks, setRefid, setupDirectoryScanner, setupDirectoryScanner, toString
Methods 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, tooManyAttributes
Methods inherited from class org.apache.tools.ant.ProjectComponent
getDescription, getLocation, getProject, log, log, setDescription, setLocation, setProject
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
Methods inherited from interface org.apache.tools.ant.types.ResourceCollection
isEmpty, stream
-
Field Details
-
ifCond
-
unlessCond
-
-
Constructor Details
-
ConditionalFileSet
public ConditionalFileSet()
-
-
Method Details
-
execute
public void execute() throws org.apache.tools.ant.BuildException- Throws:
org.apache.tools.ant.BuildException
-
getRef
protected org.apache.tools.ant.types.AbstractFileSet getRef(org.apache.tools.ant.Project p) overrides FileSet's implementation which would throw an exception since the referenced object isn't this type.- Overrides:
getRef
in classorg.apache.tools.ant.types.FileSet
-
isActive
public boolean isActive() throws org.apache.tools.ant.BuildExceptionReturns 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 fileset 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. -
setUnless
Set the property name for the 'unless' condition. If named property is set, the fileset 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
-