public final class InterceptorUtil extends Object
| Constructor and Description |
|---|
InterceptorUtil(WebBeansContext webBeansContext) |
| Modifier and Type | Method and Description |
|---|---|
Object |
callAroundInvokes(WebBeansContext webBeansContext,
InjectionTargetBean<?> bean,
Object instance,
CreationalContextImpl<?> creationalContext,
Method proceed,
Object[] arguments,
List<InterceptorData> stack,
javax.interceptor.InvocationContext ejbInvocationContext,
Object altKey) |
<T> void |
checkAnnotatedTypeInterceptorConditions(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType) |
boolean |
checkGivenClassIsInInterceptorList(Class<?> mainClass,
Class<?> candidateClass)
Return true if given candidate is listed in interceptors list.
|
boolean |
checkInInterceptorHierarchy(Class<?> interceptorClass,
Class<?> candidateClass)
Return true if candidate class is a super class of given interceptor
class.
|
void |
checkInterceptorConditions(javax.enterprise.inject.spi.AnnotatedType annotatedType) |
<T> void |
checkLifecycleConditions(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType,
Annotation[] annots,
String errorMessage) |
<T> void |
checkLifecycleConditions(Class<T> clazz,
Annotation[] annots,
String errorMessage) |
void |
checkSimpleWebBeansInterceptorConditions(Class<?> clazz) |
void |
filterCommonInterceptorStackList(List<InterceptorData> stack,
Method method)
Filter bean interceptor stack.
|
void |
filterOverridenAroundInvokeInterceptor(Class<?> beanClass,
List<InterceptorData> stack)
If an AroundInvoke method is overridden by another method (regardless of
whether that method is itself an AroundInvoke method), it will not be
invoked.
|
void |
filterOverridenLifecycleInterceptor(Class<?> beanClass,
List<InterceptorData> stack)
Remove bean inherited and overriden lifecycle interceptor method from its
stack list.
|
Class<? extends Annotation> |
getInterceptorAnnotationClazz(javax.enterprise.inject.spi.InterceptionType type) |
List<InterceptorData> |
getInterceptorMethods(List<InterceptorData> stack,
javax.enterprise.inject.spi.InterceptionType type)
Gets list of interceptors with the given type.
|
<T> boolean |
isBusinessMethodInterceptor(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType) |
boolean |
isBusinessMethodInterceptor(Class<?> clazz) |
<T> boolean |
isLifecycleMethodInterceptor(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType) |
boolean |
isLifecycleMethodInterceptor(Class<?> clazz) |
boolean |
isWebBeansBusinessMethod(Method method)
Check if the given method is a 'business method'
in the sense of the Interceptor specification
|
public InterceptorUtil(WebBeansContext webBeansContext)
public boolean isWebBeansBusinessMethod(Method method)
method - true if the given method is an interceptable business methodpublic Class<? extends Annotation> getInterceptorAnnotationClazz(javax.enterprise.inject.spi.InterceptionType type)
public <T> boolean isBusinessMethodInterceptor(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
public boolean isBusinessMethodInterceptor(Class<?> clazz)
public boolean isLifecycleMethodInterceptor(Class<?> clazz)
public <T> boolean isLifecycleMethodInterceptor(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
public <T> void checkAnnotatedTypeInterceptorConditions(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType)
public void checkInterceptorConditions(javax.enterprise.inject.spi.AnnotatedType annotatedType)
public <T> void checkLifecycleConditions(Class<T> clazz, Annotation[] annots, String errorMessage)
clazz - AUTSCH! we should use the AnnotatedType for all that stuff!public <T> void checkLifecycleConditions(javax.enterprise.inject.spi.AnnotatedType<T> annotatedType,
Annotation[] annots,
String errorMessage)
public void checkSimpleWebBeansInterceptorConditions(Class<?> clazz)
public List<InterceptorData> getInterceptorMethods(List<InterceptorData> stack, javax.enterprise.inject.spi.InterceptionType type)
stack - interceptor stacktype - interceptor typepublic void filterCommonInterceptorStackList(List<InterceptorData> stack, Method method)
stack - interceptor stackmethod - called method on proxypublic Object callAroundInvokes(WebBeansContext webBeansContext, InjectionTargetBean<?> bean, Object instance, CreationalContextImpl<?> creationalContext, Method proceed, Object[] arguments, List<InterceptorData> stack, javax.interceptor.InvocationContext ejbInvocationContext, Object altKey) throws Exception
Exceptionpublic boolean checkInInterceptorHierarchy(Class<?> interceptorClass, Class<?> candidateClass)
interceptorClass - interceptor classcandidateClass - candaite classpublic void filterOverridenLifecycleInterceptor(Class<?> beanClass, List<InterceptorData> stack)
beanClass - bean classstack - bean interceptor stackpublic void filterOverridenAroundInvokeInterceptor(Class<?> beanClass, List<InterceptorData> stack)
beanClass - bean classstack - bean interceptor stackpublic boolean checkGivenClassIsInInterceptorList(Class<?> mainClass, Class<?> candidateClass)
mainClass - bean classcandidateClass - interceptor candidate classCopyright © 2008-2013 The Apache Software Foundation. All Rights Reserved.