ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <peterrei...@apache.org>
Subject Re: What is the difference between a nested element and a nested type?
Date Thu, 09 Jun 2005 15:14:03 GMT
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@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message