Changes
bindInstance
method can be used to bind an instance of an Interface to the interface type:
EasyDI context = new EasyDI();
MyService serviceInstance = new MyServiceImpl();
context.bindInstance(MyService.class, serviceInstance);
- Error messages that are thrown when there is a missconfiguration are now providing more information about the type of the error. EasyDI tells you which class asks for an instance that can't be created.