o merged from r638668 (MNG-3467: add toString() method for debugging. patch from Wayne Fay)

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@672510 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vincent Siveton 2008-06-28 12:40:45 +00:00
parent 64f6e7aa88
commit bd379f7e01
1 changed files with 35 additions and 0 deletions

View File

@ -2169,6 +2169,41 @@
</association>
</field>
</fields>
<codeSegments>
<codeSegment>
<version>4.0.0</version>
<code>
<![CDATA[
/**
* @see java.lang.Object#toString()
*/
public String toString()
{
StringBuffer sb = new StringBuffer();
sb.append("PatternSet [includes: {");
for (java.util.Iterator i = getIncludes().iterator(); i.hasNext(); )
{
String str = (String) i.next();
sb.append(str).append(", ");
}
if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length());
sb.append("}, excludes: {");
for (java.util.Iterator i = getExcludes().iterator(); i.hasNext(); )
{
String str = (String) i.next();
sb.append(str).append(", ");
}
if (sb.substring(sb.length() - 2).equals(", ")) sb.delete(sb.length() - 2, sb.length());
sb.append("}]");
return sb.toString();
}
]]>
</code>
</codeSegment>
</codeSegments>
</class>
<class>
<name>Parent</name>