原文地址:https://code.google.com/p/google-guice/wiki/BuiltInBindings
Built-in Bindings(内建的绑定):即时在injector内的绑定。例如Loggers等。
贴代码:
1 2 3 4 5 6 7 8 9 |
import com.google.inject.Guice;
|
执行结果:
Injector{bindings=[InstanceBinding{key=Key[type=com.google.inject.Stage, annotation=[none]], source=[unknown source], instance=DEVELOPMENT}, ProviderInstanceBinding{key=Key[type=com.google.inject.Injector, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider}, ProviderInstanceBinding{key=Key[type=java.util.logging.Logger, annotation=[none]], source=[unknown source], scope=Scopes.NO_SCOPE, provider=Provider}]}