Methods Summary |
---|
public void | addConfiguredFile(org.apache.tools.ant.types.FileList$FileName name)Add a nested <file> nested element.
if (name.getName() == null) {
throw new BuildException(
"No name specified in nested file element");
}
filenames.addElement(name.getName());
|
public java.io.File | getDir(org.apache.tools.ant.Project p)
if (isReference()) {
return getRef(p).getDir(p);
}
return dir;
|
public java.lang.String[] | getFiles(org.apache.tools.ant.Project p)Returns the list of files represented by this FileList.
if (isReference()) {
return getRef(p).getFiles(p);
}
if (dir == null) {
throw new BuildException("No directory specified for filelist.");
}
if (filenames.size() == 0) {
throw new BuildException("No files specified for filelist.");
}
String[] result = new String[filenames.size()];
filenames.copyInto(result);
return result;
|
protected org.apache.tools.ant.types.FileList | getRef(org.apache.tools.ant.Project p)Performs the check for circular references and returns the
referenced FileList.
return (FileList) getCheckedRef(p);
|
public boolean | isFilesystemOnly()Always returns true.
return true;
|
public java.util.Iterator | iterator()Fulfill the ResourceCollection contract.
if (isReference()) {
return ((FileList) getRef(getProject())).iterator();
}
return new FileResourceIterator(dir,
(String[]) (filenames.toArray(new String[filenames.size()])));
|
public void | setDir(java.io.File dir)Set the dir attribute.
checkAttributesAllowed();
this.dir = dir;
|
public void | setFiles(java.lang.String filenames)Set the filenames attribute.
checkAttributesAllowed();
if (filenames != null && filenames.length() > 0) {
StringTokenizer tok = new StringTokenizer(
filenames, ", \t\n\r\f", false);
while (tok.hasMoreTokens()) {
this.filenames.addElement(tok.nextToken());
}
}
|
public void | setRefid(Reference r)Makes this instance in effect a reference to another FileList
instance.
You must not set another attribute or nest elements inside
this element if you make it a reference.
if ((dir != null) || (filenames.size() != 0)) {
throw tooManyAttributes();
}
super.setRefid(r);
|
public int | size()Fulfill the ResourceCollection contract.
if (isReference()) {
return ((FileList) getRef(getProject())).size();
}
return filenames.size();
|