My question is: Usually in Guice I use bind (classe) .to (another_class_Implementation) ...
However, I found in the source code that they used only bind (class) (without the ".to (another_class_Implementation)" part) ...
What does it mean (bind (class) without "to or as")?
Here is the piece of code in question:
public class RestModule extends AbstractModule {
@Override
protected void configure() {
bind(RootResource.class);
bind(DeveloperUtilsRedirector.class);
bind(M34Repository.class).to(M34RepositoryImpl.class);
bind(IGARepository.class).to(IGARepositoryImpl.class);
Answers are welcome
source
share