ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <cost...@covalent.net>
Subject TaskAdapter and execute()
Date Mon, 25 Feb 2002 19:03:29 GMT
One of the changes I've made for better 'embedability' or 
integration of ant is in TaskAdatper, the ability to 
'adapt' java beans using a different name for the execute method.

For example, while most tomcat startup beans follow ant
conventions and would work perfectly in ant, we follow
the 'normal' java bean mechanisms with 'start()', 'stop()',
etc as names for methods.

The change ( you can find it in sandbox for now ) allows
a different method to be used in the 'adapted' bean.
In addition, it allows 'noop' beans to be used - i.e.
the properties will be set and a ref registered, with no
action on the bean itself ( the bean can be used by another
bean using the ref ).  While this may not be a big deal
( adding an empty execute() is easy ), it helps for existing
classes.

Opinions ? There are few (negative) tests that assume an
exception will be thrown if no execute() is found, and
obviously the beans would not work with ant1.4 ( since
it'll be a new feature ).


Costin
 


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