net.sf.antcontrib.cpptasks.types
Class ConditionalFileSet

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.types.DataType
          extended by org.apache.tools.ant.types.AbstractFileSet
              extended by org.apache.tools.ant.types.FileSet
                  extended by net.sf.antcontrib.cpptasks.types.ConditionalFileSet
All Implemented Interfaces:
java.lang.Cloneable, 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.

Author:
Curt Arnold

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
ConditionalFileSet()
           
 
Method Summary
 void 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 setIf(java.lang.String propName)
          Sets the property name for the 'if' condition.
 void setUnless(java.lang.String propName)
          Set the property name for the 'unless' condition.
 
Methods inherited from class org.apache.tools.ant.types.FileSet
clone
 
Methods inherited from class org.apache.tools.ant.types.AbstractFileSet
add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDataTypeName, getDefaultexcludes, getDir, getDirectoryScanner, getSelectors, hasPatterns, hasSelectors, isFollowSymlinks, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setDir, setExcludes, setExcludesfile, setFile, setFollowSymlinks, setIncludes, setIncludesfile, setRefid, setupDirectoryScanner, toString
 
Methods inherited from class org.apache.tools.ant.types.DataType
checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, getCheckedRef, getDescription, getRefid, isChecked, isReference, noChildrenAllowed, setChecked, setDescription, tooManyAttributes
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, log, log, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConditionalFileSet

public ConditionalFileSet()
Method Detail

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 class org.apache.tools.ant.types.AbstractFileSet

isActive

public boolean isActive()
                 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

public void setIf(java.lang.String propName)
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

public void setUnless(java.lang.String propName)
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


Copyright 2001-2008 Ant-Contrib Project. All Rights Reserved.