On Fri, Sep 16, 2016 at 8:39 PM, Ralph Goers <ralph.go...@dslextreme.com>
wrote:

> Does my answer to your other email make this question moot?
>

Kind of but not really :-) We can pause this thread and continue the more
meaty discussion in the other thread.

Thank you,
Gary

>
> Ralph
>
> On Sep 16, 2016, at 11:55 AM, Gary Gregory <garydgreg...@gmail.com> wrote:
>
> 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: garydgreg...@gmail.com | ggreg...@apache.org
> 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
>
>
>


-- 
E-Mail: garydgreg...@gmail.com | ggreg...@apache.org
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

Reply via email to