ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Murdoch" <>
Subject RE: IntrospectionHelper request
Date Sat, 05 Jan 2002 03:26:46 GMT


The Myrmidon patch I submitted last week did this, more or less.
Configuration was done via interfaces (there was even one called
AttributeSetter, as it turns out).  The piece that is missing (and this was
at the top of my "what-i-want-to-do-next" list) was some way for a class to
hand its custom introspector to the configurer.

The short-term plan was to simply use a static method, called something like
"getConfigurer()".  If present, the configurer would use whatever it
returned, if not present, the default introspector would be used.  The
longer-term plan was to grow the introspector stuff into the TaskInfo.

Either way, I think it would be a useful thing to allow a class (data type
or task) to have programmatic control over its meta-info.  Whatever
mechanism is used should ideally allow meta-info from all 3 sources to be
mixed and matched as the task writer chooses.  The 3 "sources" would be:
 - introspection
 - the task descriptor (ie the javadoc comments or whatever)
 - the class itself (programmatic).

Not so sure about doing this kind of stuff in the Ant 1 tree.  For one,
there's the whole backwards compatibility thing - all the introspection
stuff is public, and is, strictly speaking, part of the API.  Also, it would
be good to spend a while playing with this stuff, to do some prototyping and
get the concepts sorted out a little better (e.g. it may well be flexibility
syndrome).  The Ant 1 tree is not a good place to be experimenting.


> -----Original Message-----
> From: Erik Hatcher []
> Sent: Saturday, 5 January 2002 10:56 AM
> To: ant-dev
> Subject: IntrospectionHelper request
> While inquiring about some issues I was having with my attempts to get
> XDoclet custom templates working (very cool, by the way!), I got this
> request for Ant:
> "Please make IntrospectionHelper an interface with a default/derivable
> impl. I want to extend it and add a new kind of introspection, but
> everything seems to be concrete and utility class. Specifically I want
> to create my own AttributeSetter and instead of invoking a setter method
> in the target task/element, set a config param value in a hashtable
> field of the target element, or in other words I want to add a more
> dynamic approach so the user can add config params without having to
> create a DocletTask-derived class and getter/setter there."
> I don't quite have the bandwidth or intimate know-how of
> IntrospectionHelper
> yet to give a good response.  Thoughts??
>     Erik
> --
> To unsubscribe, e-mail:   <>
> For additional commands, e-mail: <>

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

View raw message