|Eclipse custom DI [message #953829]
||Mon, 22 October 2012 11:10
| Daniele Canavese
Registered: August 2012
I would like to start injecting my custom classes using the e4 dependency injection mechanism but I haven't had any luck so far.
I have a custom class called Coordinator containing an injected logger (from java.util.logging.Logger):
public class Coordinator
@Inject private Logger logger;
As far I have understood I have to use the InjectorFactory to achieve the DI, such as:
Coordinator coordinator = InjectorFactory.getDefault().make(Coordinator.class, null);
But what are the addBinding() arguments? Or am I missing something?
Powered by FUDForum
. Page generated in 0.01649 seconds