You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Matt Sicker (JIRA)" <ji...@apache.org> on 2014/09/25 04:50:34 UTC

[jira] [Created] (LOG4J2-860) Unify plugin builders and plugin factories

Matt Sicker created LOG4J2-860:
----------------------------------

             Summary: Unify plugin builders and plugin factories
                 Key: LOG4J2-860
                 URL: https://issues.apache.org/jira/browse/LOG4J2-860
             Project: Log4j 2
          Issue Type: Improvement
          Components: Plugins
    Affects Versions: 2.2
            Reporter: Matt Sicker


Before we can even settle on a preferred way to create plugins reflectively, it would be nice to combine the PluginAttribute and PluginBuilderAttribute annotations. In fact, allowing for flexibility in dependency injection for creating plugins would be better than strictly allowing factory methods or builder classes only. For instance, setter methods could be annotated for injection which allows for further customization.

Since the ability to reflect on a parameter to get its name wasn't added until Java 1.8 (and alternatives require using bytecode libraries like asm), it would be nice to add some sort of plugin validation to the annotation processor to prevent users from forgetting to specify an attribute name when attached to a parameter instead of a field.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org