use of org.apache.tools.ant.types.resources.FileProvider in project ant by apache.
the class XmlProperty method getResource.
/**
* @return the resource.
*/
protected Resource getResource() {
// delegate this way around to support subclasses that
// overwrite getFile
File f = getFile();
FileProvider fp = src.as(FileProvider.class);
return f == null ? src : fp != null && fp.getFile().equals(f) ? src : new FileResource(f);
}
use of org.apache.tools.ant.types.resources.FileProvider in project ant by apache.
the class ArchiveScanner method setSrc.
/**
* Sets the src for scanning. This is the jar or zip file that
* is scanned for matching entries.
*
* @param src the (non-null) archive resource
*/
public void setSrc(Resource src) {
this.src = src;
FileProvider fp = src.as(FileProvider.class);
if (fp != null) {
srcFile = fp.getFile();
}
}
Aggregations