I am working to implement a dependency injection of a constructor in a J2EE jersey project. I am using HK2. I create a class
class MyServiceImpl implements MyService{
@Inject
public MyServiceImpl(String test){
// do something
}
}
Now, my question is when I register this dependency injection in a dependencybinder class by extending AbstractBinder, what is the difference between binding the dependency as a simple "bind" vs a "bindAsContract"?