jvz opened a new issue, #3875: URL: https://github.com/apache/logging-log4j2/issues/3875
The Log4j annotation processor should be enhanced to generate and store metadata related to the dependencies of plugins. This should help with implementing https://github.com/apache/logging-log4j2/issues/3055 as dependency information needs to be scanned for reflection reachability purposes anyways. This metadata should be sufficient for performing dependency injection on those classes without runtime discovery. While the initial implementation will rely on reflection to create and configure plugin instances, this will not require scanning over code reflectively to find members based on programmatic considerations and can rely on the previously created index. This index should replicate the dependency injection rules defined by `InstanceFactory`. Such an index would make it possible to add better checking of Log4j plugins for correctness at build time and when parsing a configuration. For example, if plugin `P` has a required attribute `A` and a dependency of type `D`, then the metadata for `P` should note its injection points, and it should also have metadata (or generated code) to specify how to bind to injection points. For reflection purposes, this would indicate which IPs are fields, which IPs are part of an injectable constructor, and which IPs are part of methods. Whatever approach is used here should remain flexible so that a code generation approach can be used as an alternative to the reflective approach in a later feature. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@logging.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org