Skip to content

Commit

Permalink
mention toString:
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@612409 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information
steveloughran committed Jan 16, 2008
1 parent 187ab8a commit a7ab2d6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions docs/manual/using.html
Original file line number Diff line number Diff line change
Expand Up @@ -642,6 +642,27 @@ <h3><a name="references">References</a></h3>
deliberately assign a different meaning to <code>refid</code>.</p>


<h3><a name="toString">Getting the value of a Reference with ${toString:}</a></h3>
<p>
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.
</p>
<p>
For example, here is how to get a listing of the files in a fileset,
<p>
<pre>
&lt;fileset id=&quot;sourcefiles&quot; dir=&quot;src&quot; includes=&quot;**/*.java&quot; /&gt;
&lt;echo&gt; sourcefiles = ${toString:sourcefiles} &lt;/echo&gt;
</pre>
<p>
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:
Expand Down

0 comments on commit a7ab2d6

Please sign in to comment.