Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 1049 invoked from network); 25 Mar 2002 11:47:49 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 25 Mar 2002 11:47:49 -0000 Received: (qmail 28186 invoked by uid 97); 25 Mar 2002 11:47:42 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 28123 invoked by uid 97); 25 Mar 2002 11:47:41 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 28109 invoked from network); 25 Mar 2002 11:47:41 -0000 Subject: createXXX and addXXX in custom tasks To: ant-user@jakarta.apache.org X-Mailer: Lotus Notes Release 5.0.8 June 18, 2001 Message-ID: From: David.Bailey@lawson.com Date: Mon, 25 Mar 2002 05:45:28 -0600 X-MIMETrack: Serialize by Router on SMTP/Lawson(Release 5.0.9a |January 7, 2002) at 03/25/2002 05:47:07 AM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N 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: For additional commands, e-mail: