org.apache.tools.ant.taskdefs.condition

Class IsFileSelected

Implemented Interfaces:
Condition, SelectorContainer

public class IsFileSelected
extends AbstractSelectorContainer
implements Condition

This is a condition that checks to see if a file passes an embedded selector.

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

Method Summary

boolean
eval()
Evaluate the selector with the file.
void
setBaseDir(File baseDir)
The base directory to use.
void
setFile(File file)
The file to check.
void
validate()
validate the parameters.

Methods inherited from class org.apache.tools.ant.types.selectors.AbstractSelectorContainer

add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, getSelectors, hasSelectors, selectorCount, selectorElements, toString, validate

Methods inherited from class org.apache.tools.ant.types.DataType

checkAttributesAllowed, checkChildrenAllowed, circularReference, dieOnCircularReference, getCheckedRef, getDescription, getRefid, isChecked, isReference, noChildrenAllowed, setChecked, setDescription, setRefid, tooManyAttributes

Methods inherited from class org.apache.tools.ant.ProjectComponent

getProject, log, log, setProject

Method Details

eval

public boolean eval()
Evaluate the selector with the file.
Specified by:
eval in interface Condition
Returns:
true if the file is selected by the embedded selector.

setBaseDir

public void setBaseDir(File baseDir)
The base directory to use.
Parameters:
baseDir - the base directory to use, if null use the project's basedir.

setFile

public void setFile(File file)
The file to check.
Parameters:
file - the file to check if if passes the embedded selector.

validate

public void validate()
validate the parameters.
Overrides:
validate in interface AbstractSelectorContainer

Copyright B) 2000-2006 Apache Software Foundation. All Rights Reserved.