|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.inject.AbstractModule
org.directwebremoting.guice.util.AbstractModule
public abstract class AbstractModule
An extension of Guice's AbstractModule
that provides support for member injection of objects created before injector creation,
including AbstractModule itself and
MethodInterceptor instances
constructed at bind-time.
In addition, there are bindInterceptor variants
that arrange for the interceptors to be constructor-injected, that can wrap each interceptor
with extra common behavior, and that intercept all calls to methods declared by a given type.
These variants all call registerForInjection, so there is
no need to call it explicitly when using these methods (though it's harmless to do so).
The Class<?> and Key<?> arguments in the
bindInterceptor variants really should
be Class<? extends MethodInterceptor> and Key<? extends MethodInterceptor>,
but this would cause compile-time warnings on every use.
| Method Summary | |
|---|---|
void |
bindInterceptor(java.lang.Class<?> targetType,
java.lang.Class<?>... methodInterceptorClasses)
Variant of bindInterceptor intercepting
non-nested calls to instances of a given type (or of a subclass of that type),
allowing constructor-injection of interceptors described by class. |
void |
bindInterceptor(java.lang.Class<?> targetType,
com.google.inject.Key<?>... methodInterceptorKeys)
Variant of bindInterceptor intercepting
non-nested calls to instances of a given type (or of a subclass of that type),
allowing constructor-injection of interceptors described by
Key. |
void |
bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
java.lang.Class<?>... methodInterceptorClasses)
Variant of bindInterceptor(Class, Class...) that allows
constructor-injection of interceptors described by class. |
void |
bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
com.google.inject.Key<?>... methodInterceptorKeys)
Variant of bindInterceptor that
allows constructor-injection of interceptors described by
Key. |
void |
bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
org.aopalliance.intercept.MethodInterceptor... methodInterceptors)
Overridden version of bindInterceptor
that, in addition to the standard behavior, arranges for field and method injection
of each MethodInterceptor in interceptors. |
void |
bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
MethodInterceptorWrapper methodInterceptorWrapper,
java.lang.Class<?>... methodInterceptorClasses)
Variant of bindInterceptor that
allows constructor-injection of interceptors described by class, each
wrapped by a method interceptor wrapper. |
void |
bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
MethodInterceptorWrapper methodInterceptorWrapper,
com.google.inject.Key<?>... methodInterceptorKeys)
Variant of bindInterceptor that
allows constructor-injection of interceptors described by Key, each
wrapped by a method interceptor wrapper. |
| Methods inherited from class com.google.inject.AbstractModule |
|---|
configure |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
org.aopalliance.intercept.MethodInterceptor... methodInterceptors)
bindInterceptor
that, in addition to the standard behavior, arranges for field and method injection
of each MethodInterceptor in interceptors.
bindInterceptor in class com.google.inject.AbstractModuleclassMatcher - matches classes the interception should apply to.
For example: only(Runnable.class).methodMatcher - matches methods the interception should apply to.
For example: annotatedWith(Transactional.class).methodInterceptors - chain of
MethodInterceptors
used to intercept calls.
public void bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
java.lang.Class<?>... methodInterceptorClasses)
bindInterceptor(Class, Class...) that allows
constructor-injection of interceptors described by class.
classMatcher - matches classes the interception should apply to.
For example: only(Runnable.class).methodMatcher - matches methods the interception should apply to.
For example: annotatedWith(Transactional.class).methodInterceptorClasses - chain of
MethodInterceptors
used to intercept calls, specified by class.
public void bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
com.google.inject.Key<?>... methodInterceptorKeys)
bindInterceptor that
allows constructor-injection of interceptors described by
Key.
classMatcher - matches classes the interception should apply to.
For example: only(Runnable.class).methodMatcher - matches methods the interception should apply to.
For example: annotatedWith(Transactional.class).methodInterceptorKeys - chain of
MethodInterceptors
used to intercept calls, specified by Key.
public void bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
MethodInterceptorWrapper methodInterceptorWrapper,
java.lang.Class<?>... methodInterceptorClasses)
bindInterceptor that
allows constructor-injection of interceptors described by class, each
wrapped by a method interceptor wrapper.
classMatcher - matches classes the interception should apply to.
For example: only(Runnable.class).methodMatcher - matches methods the interception should apply to.
For example: annotatedWith(Transactional.class).methodInterceptorWrapper - a wrapper applied to each of the specified interceptors.methodInterceptorClasses - chain of
MethodInterceptors
used to intercept calls, specified by class.
public void bindInterceptor(com.google.inject.matcher.Matcher<? super java.lang.Class<?>> classMatcher,
com.google.inject.matcher.Matcher<? super java.lang.reflect.Method> methodMatcher,
MethodInterceptorWrapper methodInterceptorWrapper,
com.google.inject.Key<?>... methodInterceptorKeys)
bindInterceptor that
allows constructor-injection of interceptors described by Key, each
wrapped by a method interceptor wrapper.
classMatcher - matches classes the interception should apply to.
For example: only(Runnable.class).methodMatcher - matches methods the interception should apply to.
For example: annotatedWith(Transactional.class).methodInterceptorWrapper - a wrapper applied to each of the specified interceptors.methodInterceptorKeys - chain of
MethodInterceptors
used to intercept calls, specified by Key.
public final void bindInterceptor(java.lang.Class<?> targetType,
java.lang.Class<?>... methodInterceptorClasses)
bindInterceptor intercepting
non-nested calls to instances of a given type (or of a subclass of that type),
allowing constructor-injection of interceptors described by class.
targetType - the type for which method calls are to be interceptedmethodInterceptorClasses - chain of
MethodInterceptors
used to intercept calls, specified by class.
public final void bindInterceptor(java.lang.Class<?> targetType,
com.google.inject.Key<?>... methodInterceptorKeys)
bindInterceptor intercepting
non-nested calls to instances of a given type (or of a subclass of that type),
allowing constructor-injection of interceptors described by
Key.
targetType - the type for which method calls are to be interceptedmethodInterceptorKeys - chain of
MethodInterceptors
used to intercept calls, specified by Key.
|
Copyright ยจ 2008 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||