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:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2010-03-21  
 123456
78910111213
14151617181920
21222324252627
28293031   

数据统计

  • 访问量: 60400
  • 日志数: 171
  • 影音数: 3
  • 建立时间: 2008-02-28
  • 更新时间: 2008-05-19

RSS订阅

Open Toolbar