Re: What is the difference between a nested element and a nested
type? | Re: What is the difference between a nested element and a nested
type? 2005-06-09 - By peter reilly
Eric Tchepannou wrote:
> Hi Peter, > >As my base class is an abstract class, I have no interest to use a <base /> >My hope is to do the following: > > ---- Reflect.java -- > package my; > > public class Reflect extends org.apache.tools.ant.Task { > List types = new ArrayList(); > public void add(BaseType bt) { > types.add(bt); > } > } > >----BaseType.java------ >package my; > >public abstract BaseType implements IType { > ... >} > >----ConcreteType1|2.java------ >package my; > >public ConcreteType1|2 extends BaseType { > ... >} > > ---- build.xml --- > <target name="reflect" depends="compile"> > <taskdef name="reflect" classname="my.Reflect" > classpath="classes" loaderref="my.loaderref"/> > <typedef name="concete1|2" classname="my.ConcreteType1|2" > classpath="classes" loaderref="my.loaderref"/> > <reflect> > <concrete1/> > <concrete2/> > </reflect> > </target> > .. > >Does this make sense? > > Yes, it is in fact the reason that the add(javaclass x) reflection method was added in ant 1.6.!
Peter
--------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@(protected) For additional commands, e-mail: user-help@(protected)
|
|
 |