From 787e7cf9415df6a58eeb9a2fc3491ef21b3134c3 Mon Sep 17 00:00:00 2001 From: Steve Loughran Date: Wed, 16 Jan 2008 10:21:48 +0000 Subject: [PATCH] mention toString: git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@612409 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/using.html | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/docs/manual/using.html b/docs/manual/using.html index 7ee89fdb9..d10f56b64 100644 --- a/docs/manual/using.html +++ b/docs/manual/using.html @@ -642,6 +642,27 @@ implementation of the element upon which it is specified. Some tasks (the deliberately assign a different meaning to refid.

+

Getting the value of a Reference with ${toString:}

+

+Any Ant type which has been declared with a reference can also its string +value extracted by using the ${toString:} operation, +with the name of the reference listed after the toString: text. +The toString() 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, +

+

+<fileset id="sourcefiles" dir="src" includes="**/*.java" />
+<echo> sourcefiles = ${toString:sourcefiles} </echo>
+
+

+There is no guarantee that external types provide meaningful information in such +a situation

+ +

Use of external tasks

Ant supports a plugin mechanism for using third party tasks. For using them you have to do two steps: