google / guice

Guice (pronounced 'juice') is a lightweight dependency injection framework for Java 11 and above, brought to you by Google.
https://github.com/google/guice
Apache License 2.0
12.48k stars 1.67k forks source link

Enable to define a custom "@Inject" marker (ie add some extension point for reflection doing getAnnotation/isAnnotationPresent on this marker) #1782

Open rmannibucau opened 9 months ago

rmannibucau commented 9 months ago

High level the idea is to be able to use guice without leaking it as an API in a product with some SPI/extension point. Leaking @Inject is not always desired so would be neat to not require some bytecode manipulation to implement it, code does not look crazy and could even enable to make all last guice version "forks" to converge to a single version with this abstraction and be compatible with hybrid system using javax and jakarta modules.