/** * 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. * @param basedir The the base directory. * @param filename The name of the file to check. * @param file A File object for this filename. * @return whether the file should be selected or not. * @exception BuildException if an error occurs. */ public boolean isSelected(File basedir, String filename, File file) throws BuildException { validate(); if (!parameters.isEmpty() && dynselector instanceof ExtendFileSelector) { // We know that dynselector must be non-null if no error message ((ExtendFileSelector) dynselector).setParameters( parameters.toArray(new Parameter[parameters.size()])); } return dynselector.isSelected(basedir, filename, file); }