ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r612409 - /ant/core/trunk/docs/manual/using.html
Date Wed, 16 Jan 2008 10:21:49 GMT
Author: stevel
Date: Wed Jan 16 02:21:48 2008
New Revision: 612409

mention toString:


Modified: ant/core/trunk/docs/manual/using.html
--- ant/core/trunk/docs/manual/using.html (original)
+++ ant/core/trunk/docs/manual/using.html Wed Jan 16 02:21:48 2008
@@ -642,6 +642,27 @@
 deliberately assign a different meaning to <code>refid</code>.</p>
+<h3><a name="toString">Getting the value of a Reference with ${toString:}</a></h3>
+Any Ant type which has been declared with a reference can also its string
+value extracted by using the <code>${toString:}</code> operation,
+with the name of the reference listed after the  <code>toString:</code> text.

+The  <code>toString()</code> method of the Java class instance that is
+referenced is invoked -all built in types strive to produce useful and relevant
+output in such an instance.
+For example, here is how to get a listing of the files in a fileset, 
+&lt;fileset id=&quot;sourcefiles&quot; dir=&quot;src&quot; includes=&quot;**/*.java&quot;
+&lt;echo&gt; sourcefiles = ${toString:sourcefiles} &lt;/echo&gt;
+There is no guarantee that external types provide meaningful information in such
+a situation</p>
 <h3><a name="external-tasks">Use of external tasks</a></h3> 
 Ant supports a plugin mechanism for using third party tasks. For using them you 
 have to do two steps: 

View raw message