ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject Re: Tasks, DataTypes and Factories
Date Wed, 06 Mar 2002 20:10:24 GMT
On Thu, 7 Mar 2002 04:09, wrote:
> 2. Allow the use of optional namespaces in tasks. We already have
> too many tasks in the default namespace, some grouping would
> improve the readability and maintainability. Of course, all
>  existing tasks will continue to work without namespaces.
> This require a new method in Project: createComponent() that
> will take a namespace and a tag name.

No need for a separate namespace parameter in interface. Just pass in 
"namespace:name" as the name and have the factory decode it if it wants. It 
is not like this code is performance intensive and if it was there is plenty 
of other places that should be dealt with first.

> 4. Make task/datatyle creation and behavior more consistent
> with each other. They should use similar code for creation,
> adapters ( for 'external' beans not implementing ant interfaces).

As long as only classes extending Task/DataType/ProjectComponent are returned 
from factory then all should be good. Well ... unless you do anything tricky 
with classloader in which case you will need to mod the rest of code base 
anyways ;)

* hasRole() should be hasProjectComponent() ?
* createProjectComponent() should return a ProjectComponent ?

BTW just as a note that this is the same mechanism I have been using in 
Myrmidon for a while now (Though I called it TypeFactory). It was also the 
method via which I made it possible for users to write tasks as templates or 
scripts etc. So when I upload this stuff next week sometime it may be a good 
idea to prototype that stuff to make sure it is doable under your proposal 
(though I can't see why it shouldn't be depending on how you register the 



"It is easy to dodge our responsibilities, but we 
cannot dodge the consequences of dodging our 
responsibilities." -Josiah Stamp 

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message