Browse Source

didn't mean to remove the toString method with my last commit.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269421 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 24 years ago
parent
commit
a7f39c75ec
1 changed files with 34 additions and 28 deletions
  1. +34
    -28
      src/main/org/apache/tools/ant/types/PatternSet.java

+ 34
- 28
src/main/org/apache/tools/ant/types/PatternSet.java View File

@@ -121,26 +121,26 @@ public class PatternSet extends DataType {
return true; return true;
} }


public String toString() {
StringBuffer buf = new StringBuffer(name);
if ((ifCond != null) || (unlessCond != null)) {
buf.append(":");
String connector = "";
if (ifCond != null) {
buf.append("if->");
buf.append(ifCond);
connector = ";";
}
if (unlessCond != null) {
buf.append(connector);
buf.append("unless->");
buf.append(unlessCond);
}
}
return buf.toString();
}
public String toString() {
StringBuffer buf = new StringBuffer(name);
if ((ifCond != null) || (unlessCond != null)) {
buf.append(":");
String connector = "";
if (ifCond != null) {
buf.append("if->");
buf.append(ifCond);
connector = ";";
}
if (unlessCond != null) {
buf.append(connector);
buf.append("unless->");
buf.append(unlessCond);
}
}
return buf.toString();
}
} }


public PatternSet() { public PatternSet() {
@@ -402,16 +402,16 @@ public class PatternSet extends DataType {
if (includesFileList.size() > 0) { if (includesFileList.size() > 0) {
Enumeration e = includesFileList.elements(); Enumeration e = includesFileList.elements();
while (e.hasMoreElements()) { while (e.hasMoreElements()) {
NameEntry ne = (NameEntry)e.nextElement();
String fileName = ne.evalName(p);
if (fileName != null) {
NameEntry ne = (NameEntry)e.nextElement();
String fileName = ne.evalName(p);
if (fileName != null) {
File inclFile = p.resolveFile(fileName); File inclFile = p.resolveFile(fileName);
if (!inclFile.exists()) if (!inclFile.exists())
throw new BuildException("Includesfile " throw new BuildException("Includesfile "
+ inclFile.getAbsolutePath() + inclFile.getAbsolutePath()
+ " not found."); + " not found.");
readPatterns(inclFile, includeList, p); readPatterns(inclFile, includeList, p);
}
}
} }
includesFileList.clear(); includesFileList.clear();
} }
@@ -419,19 +419,25 @@ public class PatternSet extends DataType {
if (excludesFileList.size() > 0) { if (excludesFileList.size() > 0) {
Enumeration e = includesFileList.elements(); Enumeration e = includesFileList.elements();
while (e.hasMoreElements()) { while (e.hasMoreElements()) {
NameEntry ne = (NameEntry)e.nextElement();
String fileName = ne.evalName(p);
if (fileName != null) {
NameEntry ne = (NameEntry)e.nextElement();
String fileName = ne.evalName(p);
if (fileName != null) {
File exclFile = p.resolveFile(fileName); File exclFile = p.resolveFile(fileName);
if (!exclFile.exists()) if (!exclFile.exists())
throw new BuildException("Excludesfile " throw new BuildException("Excludesfile "
+ exclFile.getAbsolutePath() + exclFile.getAbsolutePath()
+ " not found."); + " not found.");
readPatterns(exclFile, excludeList, p); readPatterns(exclFile, excludeList, p);
}
}
} }
excludesFileList.clear(); excludesFileList.clear();
} }
} }


public String toString()
{
return "patternSet{ includes: " + includeList +
" excludes: " + excludeList + " }";
}

} }

Loading…
Cancel
Save