The project I am currently working on uses reflection to lookup beans and inject them into corresponding injection points. The project is also built on Spring. For some reason it has been bugging me to see all the reflection for a while.
Then I thought how about using org.openide.filesystems
to represent the injections and injection points in an xml file which gets generated by AnnotationProcessors
at compile time. This xml file could be loaded at runtime
and all the dependencies injected at appropriate injection points.
While I know that I can just create an example implementation, I am afraid that I might be just trying reinvent the wheel, so I decided to post the question here. Why is that nobody objects to use and abuse of spring and reflection in Web Projects ?