ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jose Alberto Fernandez <j_a_fernan...@yahoo.com>
Subject Re: antlib descriptor
Date Thu, 21 Feb 2002 11:20:07 GMT
 --- Stefan Bodewig <bodewig@apache.org> wrote: > On
Thu, 21 Feb 2002, Peter Donald <peter@apache.org>
> wrote:
> > On Thu, 21 Feb 2002 02:02, Stefan Bodewig wrote:
> 
> >> In the very first place, I'm with Adam here,
> roles just reflect
> >> that there will be more pluggable things than
> just tasks and data
> >> types in later version of the descriptor.  A way
> to
> [...]
> >> avoid hard coded names in the parser.
> > 
> > Can you explain?
> 
> Without roles, we need a parser for the descriptor
> that has the String
> "task" and "data-type" hard coded into it and need
> to patch it when we
> want to add new pluggable things.
> 

If you look at my code for reading the descriptor (and
do not count the additional code for 'role'
declarations), the only thing that you need is in the
project API to have the following methods:

   boolean isDefinedOnRole(String role, String name);
   void addDefinitionOnRole(String role, 
                            String name, Class clz);
   boolean isRoleDefined(String role);

the implementations on project may just validate that
roles are only "task" or "data-type" for now, but the
code in the task is completely generic.

Notice that we do not need to agree on what a role
means or how it gets processed, or even how to define
it, that would be on part 2 of this fight ;-)

The code only needs to know about their existance.

Jose Alberto


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com

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