mbenson 2005/08/04 12:57:09
Modified: src/main/org/apache/tools/ant/types DataType.java
Log:
add a basic toString() to DataTypes.
Revision Changes Path
1.28 +12 -1 ant/src/main/org/apache/tools/ant/types/DataType.java
Index: DataType.java
===================================================================
RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/DataType.java,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- DataType.java 3 Jun 2005 16:46:55 -0000 1.27
+++ DataType.java 4 Aug 2005 19:57:09 -0000 1.28
@@ -338,4 +338,15 @@
throw noChildrenAllowed();
}
}
-}
\ No newline at end of file
+
+ /**
+ * Basic DataType toString().
+ * @return this DataType formatted as a String.
+ */
+ public String toString() {
+ String d = getDescription();
+ return d == null ? getDataTypeName() : getDataTypeName() + " " + d;
+ }
+
+}
+
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]