peterreilly 2004/02/23 07:46:49
Modified: src/main/org/apache/tools/ant/types Tag: ANT_16_BRANCH
FileList.java
Log:
sync with head
Revision Changes Path
No revision
No revision
1.9.2.4 +34 -5 ant/src/main/org/apache/tools/ant/types/FileList.java
Index: FileList.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/FileList.java,v
retrieving revision 1.9.2.3
retrieving revision 1.9.2.4
diff -u -r1.9.2.3 -r1.9.2.4
--- FileList.java 9 Feb 2004 22:12:40 -0000 1.9.2.3
+++ FileList.java 23 Feb 2004 15:46:48 -0000 1.9.2.4
@@ -30,19 +30,25 @@
* whether they currently exist. By contrast, FileSet operates as a
* filter, only returning the name of a matched file if it currently
* exists in the file system.
- *
- * @author <a href="mailto:[EMAIL PROTECTED]">Craeg Strong</a>
- * @version $Revision$ $Date$
*/
public class FileList extends DataType {
private Vector filenames = new Vector();
private File dir;
+ /**
+ * The default constructor.
+ *
+ */
public FileList() {
super();
}
+ /**
+ * A copy constructor.
+ *
+ * @param filelist a <code>FileList</code> value
+ */
protected FileList(FileList filelist) {
this.dir = filelist.dir;
this.filenames = filelist.filenames;
@@ -55,6 +61,8 @@
*
* <p>You must not set another attribute or nest elements inside
* this element if you make it a reference.</p>
+ * @param r the reference to another filelist.
+ * @exception BuildException if an error occurs.
*/
public void setRefid(Reference r) throws BuildException {
if ((dir != null) || (filenames.size() != 0)) {
@@ -63,6 +71,12 @@
super.setRefid(r);
}
+ /**
+ * Set the dir attribute.
+ *
+ * @param dir the directory this filelist is relative to.
+ * @exception BuildException if an error occurs
+ */
public void setDir(File dir) throws BuildException {
if (isReference()) {
throw tooManyAttributes();
@@ -70,6 +84,10 @@
this.dir = dir;
}
+ /**
+ * @param p the current project
+ * @return the directory attribute
+ */
public File getDir(Project p) {
if (isReference()) {
return getRef(p).getDir(p);
@@ -77,12 +95,19 @@
return dir;
}
+ /**
+ * Set the filenames attribute.
+ *
+ * @param filenames a string contains filenames, separated by , or
+ * by whitespace.
+ */
public void setFiles(String filenames) {
if (isReference()) {
throw tooManyAttributes();
}
if (filenames != null && filenames.length() > 0) {
- StringTokenizer tok = new StringTokenizer(filenames, ",
\t\n\r\f", false);
+ StringTokenizer tok = new StringTokenizer(
+ filenames, ", \t\n\r\f", false);
while (tok.hasMoreTokens()) {
this.filenames.addElement(tok.nextToken());
}
@@ -91,6 +116,8 @@
/**
* Returns the list of files represented by this FileList.
+ * @param p the current project
+ * @return the list of files represented by this FileList.
*/
public String[] getFiles(Project p) {
if (isReference()) {
@@ -113,6 +140,8 @@
/**
* Performs the check for circular references and returns the
* referenced FileList.
+ * @param p the current project
+ * @return the FileList represented by a referenced filelist.
*/
protected FileList getRef(Project p) {
if (!isChecked()) {
@@ -130,4 +159,4 @@
}
}
-} //-- FileList.java
+}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]