ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <>
Subject Quick question about creating nested elements
Date Sat, 10 Feb 2001 03:20:21 GMT
Is there any way to create a nested element at runtime without knowing what
the element name was?  I have written a few tasks, which use the
'createXXXX()' syntax for creating a nested element, but I would like to be
able to create any type of nested element, by something like this:

 public Object create(String type) {
   return project.createTask(type);

or something like that, so I could then write my build.xml:


without having to have createJavac(), createJar(), createWhatever() methods
on mytask.  Is there any way to do this currently?  If not where would I
look to add it?

It looks like ProjectHelper and/or IntrospectionHelper (ala NestedCreator),
but I am not 100% sure.


View raw message