org.apache.tools.ant.types.selectors
Class ExtendSelector
- FileSelector
public class ExtendSelector
Selector that selects files by forwarding the request on to other classes.
void | addParam(Parameter p) - Create new parameters to pass to custom selector.
|
Path | createClasspath() - Specify the classpath to use to load the Selector (nested element).
|
Path | getClasspath() - Get the classpath
|
boolean | isSelected(File basedir, String filename, File file) - Allows the custom selector to choose whether to select a file.
|
void | selectorCreate() - Instantiates the identified custom selector class.
|
void | setClassname(String classname) - Sets the classname of the custom selector.
|
void | setClasspath(Path classpath) - Set the classpath to load the classname specified using an attribute.
|
void | setClasspathref(Reference r) - Set the classpath to use for loading a custom selector by using
a reference.
|
void | verifySettings() - These are errors specific to ExtendSelector only.
|
checkAttributesAllowed , checkChildrenAllowed , circularReference , dieOnCircularReference , getCheckedRef , getDescription , getRefid , isChecked , isReference , noChildrenAllowed , setChecked , setDescription , setRefid , tooManyAttributes |
ExtendSelector
public ExtendSelector()
Default constructor.
addParam
public void addParam(Parameter p)
Create new parameters to pass to custom selector.
p
- The new Parameter object
createClasspath
public final Path createClasspath()
Specify the classpath to use to load the Selector (nested element).
- a classpath to be configured
getClasspath
public final Path getClasspath()
Get the classpath
isSelected
public boolean isSelected(File basedir,
String filename,
File file)
throws BuildException
Allows the custom selector to choose whether to select a file. This
is also where the Parameters are passed to the custom selector,
since we know we must have them all by now. And since we must know
both classpath and classname, creating the class is deferred to here
as well.
- isSelected in interface FileSelector
- isSelected in interface BaseSelector
selectorCreate
public void selectorCreate()
Instantiates the identified custom selector class.
setClassname
public void setClassname(String classname)
Sets the classname of the custom selector.
classname
- is the class which implements this selector
setClasspath
public final void setClasspath(Path classpath)
Set the classpath to load the classname specified using an attribute.
classpath
- the classpath to use
setClasspathref
public void setClasspathref(Reference r)
Set the classpath to use for loading a custom selector by using
a reference.
r
- a reference to the classpath
verifySettings
public void verifySettings()
These are errors specific to ExtendSelector only. If there are
errors in the custom selector, it should throw a BuildException
when isSelected() is called.
- verifySettings in interface BaseSelector
Copyright B) 2000-2007 Apache Software Foundation. All Rights Reserved.