|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Binder
Used by Module
implementations to configure bindings.
Method Summary | ||
---|---|---|
|
bind(Class<T> type)
Creates a binding to a type. |
|
|
bind(Key<T> key)
Creates a binding to a key. |
|
|
bind(TypeLiteral<T> typeLiteral)
Creates a binding to a type. |
|
ConstantBindingBuilder |
bindConstant(Annotation annotation)
Binds a constant value to an annotation. |
|
ConstantBindingBuilder |
bindConstant(Class<? extends Annotation> annotationType)
Binds a constant value to an annotation. |
|
void |
bindInterceptor(Matcher<? super Class<?>> classMatcher,
Matcher<? super Method> methodMatcher,
MethodInterceptor... interceptors)
Binds a method interceptor to methods matched by class and method matchers. |
|
void |
bindScope(Class<? extends Annotation> annotationType,
Scope scope)
Binds a scope to an annotation. |
|
void |
install(Module module)
Uses the given module to configure more bindings. |
|
|
link(Class<T> type)
Links a type to another binding. |
|
|
link(Key<T> key)
Links a key to another binding. |
|
|
link(TypeLiteral<T> type)
Links a type to another binding. |
|
void |
requestStaticInjection(Class<?>... types)
Upon successful creation, the Container will inject static fields
and methods in the given classes. |
Method Detail |
---|
void bindInterceptor(Matcher<? super Class<?>> classMatcher, Matcher<? super Method> methodMatcher, MethodInterceptor... interceptors)
classMatcher
- matches classes the interceptor should apply to. For
example: only(Runnable.class)
.methodMatcher
- matches methods the interceptor should apply to. For
example: annotatedWith(Transactional.class)
.interceptors
- to bindvoid bindScope(Class<? extends Annotation> annotationType, Scope scope)
<T> BindingBuilder<T> bind(Key<T> key)
<T> BindingBuilder<T> bind(TypeLiteral<T> typeLiteral)
<T> BindingBuilder<T> bind(Class<T> type)
<T> LinkedBindingBuilder<T> link(Key<T> key)
<T> LinkedBindingBuilder<T> link(Class<T> type)
<T> LinkedBindingBuilder<T> link(TypeLiteral<T> type)
ConstantBindingBuilder bindConstant(Annotation annotation)
ConstantBindingBuilder bindConstant(Class<? extends Annotation> annotationType)
void requestStaticInjection(Class<?>... types)
Container
will inject static fields
and methods in the given classes.
types
- for which static members will be injectedvoid install(Module module)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |