ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: IntrospectionHelper request
Date Mon, 07 Jan 2002 05:04:39 GMT
----- 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).

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

Is this at all looking viable?

    Erik


--
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