Right now, we can say:
@PluginFactory
public static ConcurrentMap<String, Appender> createAppenders(
@PluginElement("Appenders") final Appender[] appenders) {
and you get an array of type Foo, which is really neat.
What it be out of bounds to think of doing:
@PluginElement("Thing") final Map<String, Thing> thingMap
?
My use case would be:
@PluginFactory
public static ConcurrentMap<String, Appender> createAppenders(
@PluginElement("Appenders") final Appender[] appenders,
@PluginElement("Script") final
Map<String, Script> scriptMap) {
What is the key? Good question It could be 1) Thing.getKey() or 2)
Thing.getName() or whatever method is decorated with a new @PluginKey
annotation.
Thoughts?
Gary
--
E-Mail: [email protected] | [email protected]
Java Persistence with Hibernate, Second Edition
<http://www.manning.com/bauer3/>
JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
Spring Batch in Action <http://www.manning.com/templier/>
Blog: http://garygregory.wordpress.com
Home: http://garygregory.com/
Tweet! http://twitter.com/GaryGregory