ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David.Bai...@lawson.com
Subject createXXX and addXXX in custom tasks
Date Mon, 25 Mar 2002 11:45:28 GMT

Howdy.

I've spent a fair amount of time poring over both the source code
and the docs, and I'm still a bit confused about how to use the
createXXX and addXXX methods for nested elements of a custom
task.  I understand that the ProjectHelper/IntrospectionHandler
classes won't allow me to define nested elements without these
methods, but I don't understand how I can use the data from my
nested elements at runtime.

Currently, the main class for my custom task contains an ArrayList.
Whenever the createXXX method is called for a nested element,
I instantiate a new object for the nested element, add it to the
ArrayList, and then return the new object.  I do this so that I can
use the ArrayList to reference the created object in the execute
method of my main class.  This works, but I have to believe that
my createXXX method is returning objects to ANT for a reason, and
that I should be able to get an ArrayList (Vector, some kind of
ordered list) of these objects from ANT.  I think I've found one place
where ANT stores this list, but access restrictions prevent me from
getting to it.

And, as long as we're on the subject, can someone better explain how
the addXXX method works?  What object am I supposed to pass it,
and where does it come from?  Is it basically only there to perform a
call like 'addXXX(this)'?

Thanks,

--dave


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message