* Execute the nested tasks, setting the classloader for
* any tasks that derive from Definer.
*/
public void execute() {
for (Iterator i = tasks.iterator(); i.hasNext();) {
UnknownElement ue = (UnknownElement) i.next();
setLocation(ue.getLocation());
ue.maybeConfigure();
Object configuredObject = ue.getRealThing();
if (configuredObject == null) {
continue;
}
if (!(configuredObject instanceof AntlibDefinition)) {
throw new BuildException(
"Invalid task in antlib " + ue.getTag()
+ " " + configuredObject.getClass() + " does not "
+ "extend org.apache.tools.ant.taskdefs.AntlibDefinition");
}
AntlibDefinition def = (AntlibDefinition) configuredObject;
def.setURI(uri);