Google Guice的Binder接口
上一篇 /
下一篇 2008-03-19 15:54:23
/ 个人分类:Guice
三个bind方法
/**
* Creates a binding to a key.
*/
LinkedBindingBuilder bind(Key key);
/**
* Creates a binding to a type.
*/
AnnotatedBindingBuilder bind(TypeLiteral typeLiteral);
/**
* Creates a binding to a type.
*/
AnnotatedBindingBuilder bind(Class type);
绑定Scope的
/**
* Binds a scope to an annotation.
*/
void bindScope(Class annotationType, Scope scope);
帮定拦截器的
使用Module进行配置
/**
* Uses the given module to configure more bindings.
*/
void install(Module module);
连静态方法也不放过):
/**
* Upon successful creation, the {@link Injector} will inject static fields
* and methods in the given classes.
*
* @param types for which static members will be injected
*/
void requestStaticInjection(Class... types);
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG: