Stefan Bodewig wrote: > What I'd prefer to do is to reuse the functionality of > MatchingTask via delegation. A first draft idea to do so: > > (c) Make MatchingTask implement MatchingTaskBehavior and > delegate all methods from the interface to an instance of > MatchingTaskImpl.
Delegation is certainly a good idea. And since Ant is based on introspection, we can do better. The idea is that if a class has a field that matches a suitable design pattern, then ProjectHelper.configure should look into its bean info for properties to add to the list of available propertySetters. The design pattern could be as simple as matching all public fields, or could be based on the names of the fields having a well defined prefix, or be based on the class itself being enabled as a delegate. - Sam Ruby
