ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject ProjectComponentHelper and adapters
Date Fri, 08 Mar 2002 18:01:35 GMT
I think I found a good solution for dealing with 'non-ant' tasks
and types ( the adapters ), with the minimum amount of change.

The story is simple: 

- ProjectComponentHelper is the hook that creates all components.
Based on the component name, expected role ( which is a very extensible
concept, right now it'll be DataType, Task - but we can refine this 
to deal with inner components, etc ) and ns the helper will create
a Task, DataType, etc.

- For 'normal' ant tasks/types things are simple, the real object is 

- For 'external' objects ( Filter, regular beans ) an adapter must be
returned. The current TaskAdapter is extremely limited and works only
for tasks - but hopefully there is a simple and extremely powerfull
solution - use RuntimeConfigurable.

This solution resolves a lot of problems - it allows total freedom
in how the components are 'adapted'. It requires few small changes
in RuntimeConfigurable - to allow the returned adapter ( i.e. a Task/
DataType that wraps the external object ) to access the data in
RuntimeConfigurable and get a chance to implement a custom
behavior instead of the one hardcoded in RuntimeConfigurable.

Comments ? One extra addition would be to refine a bit RuntimeConfigurable
and make it less xml-specific, but that can be a separate proposal.


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

View raw message