ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <pe...@apache.org>
Subject Re: IntrospectionHelper request
Date Mon, 07 Jan 2002 05:23:33 GMT
On Mon, 7 Jan 2002 16:04, Erik Hatcher wrote:
> ----- Original Message -----
> From: "Peter Donald" <peter@apache.org>
>
> And here's how XDoclet could do some generation for you...
>
> > package org.apache.myrmidon.framework.condition;
>
> /**
>  * ant:role condition
>  */
>
> > public interface Condition
> > {
> >   boolean test( TaskContext context );
> > }
> >
> > You would then add a roles file like
>
> So the <roles> could be generated from XDoclet tags...
>
> > <roles>
> >   <role name="condition"
> > class="org.apache.myrmidon.framework.condition.Condition"/>
> > </roles>
> >
> > You would also need to add some implementations of the Condition
> > interface/role and add them to a type library. Via adding them to
>
> types.xml
>
> > file like
> >
> > <types>
> >   <!-- some task also stored in type library -->
> >   <task name="a-task" class="..."/>
> >
> >   <!-- note that name of element matches name of role as defined in
> > roles.xml-->
> >   <condition name="and"
>
> class="org.apache.myrmidon.framework.condition.And"/>
>
> >   <condition name="or"
>
> class="org.apache.myrmidon.framework.condition.Or"/>
>
> >   <condition name="not"
>
> class="org.apache.myrmidon.framework.condition.Not"/>
>
> > </types>
>
> And org.apache.myrmidon.framework.condition.Or.java would have something
> like:
>
> /**
>  * @ant:condition or
>  */
>
> (although I'd have to dig into XDoclet more to see if/how it deals with
> "dynamic" tags but I'm sure there is a way to accomplish what is desired).

kool.

> I'm assuming these XML descriptor files are "static" in that they are
> embedded into Ant2 at build time and referenced in this manner??

the XML files are built at the same time as the type library so yep.

> Is this at all looking viable?

works for me. What license/community is this xdoclet under ?

-- 
Cheers,

Pete

--------------------------------------------------
"An intellectual is someone who has been educated 
beyond their intelligence."
--------------------------------------------------

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message