Is there any small DI framework out here that implements the
javax.inject package (bar the
@Singleton is enough) and provides only a container around it to get instances from? This framework will be embedded with my framework in other small applications, so I can't affort to have much features, or size. More features means more support from me which I don't want either. Even a "go see the documentation" is too much support for this project.
- constructor injection
- less reflection as possible, including proxy
What did I do already?
I know the following ones, but most provide way too much stuff with them and therefore a clog of APIs that I don't want/need.
- Dagger: current first choice for this project. Remove the modules and that's what I'm looking for (yes, that means no interface). A size of 58kb is excellent compared to other frameworks. The compile-time injection is the cherry on the cake.
- Guice: always my first choice when it comes to DI, but it's too big for this project, especially in terms of API.
- Spring: I said small...
- HK2: don't know enough to properly judge, but it looks like it has most of Guice's features.
- Pico-container: isn't really "pico" anymore, at least in terms of API.