public abstract class InterceptorBeanBuilder<T,B extends InterceptorBean<T>> extends Object
InterceptorBean
s.Modifier and Type | Field and Description |
---|---|
protected javax.enterprise.inject.spi.AnnotatedType<T> |
annotatedType |
protected BeanAttributesImpl<T> |
beanAttributes |
protected WebBeansContext |
webBeansContext |
Modifier | Constructor and Description |
---|---|
protected |
InterceptorBeanBuilder(WebBeansContext webBeansContext,
javax.enterprise.inject.spi.AnnotatedType<T> annotatedType,
BeanAttributesImpl<T> beanAttributes) |
Modifier and Type | Method and Description |
---|---|
protected void |
checkInterceptorConditions() |
protected abstract B |
createBean(Class<T> beanClass,
boolean enabled,
Map<javax.enterprise.inject.spi.InterceptionType,Method[]> interceptionMethods,
Method aroundConstruct) |
boolean |
defineInterceptorMethods()
Grab all methods which act as interceptors for the various
InterceptionType s. |
B |
getBean() |
abstract boolean |
isInterceptorEnabled()
If this method returns
false the getBean() method must not get called. |
protected final WebBeansContext webBeansContext
protected final javax.enterprise.inject.spi.AnnotatedType<T> annotatedType
protected final BeanAttributesImpl<T> beanAttributes
protected InterceptorBeanBuilder(WebBeansContext webBeansContext, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, BeanAttributesImpl<T> beanAttributes)
public abstract boolean isInterceptorEnabled()
false
the getBean()
method must not get called.true
if the Interceptor is enabled and a Bean should get createdprotected void checkInterceptorConditions()
public boolean defineInterceptorMethods()
Grab all methods which act as interceptors for the various
InterceptionType
s.
This method will also check some rules, e.g. that there must not be
more than a single AroundInvoke
method
on a class.
For the interceptors where multiple are allowed, the following rules apply:
true
if we found some interceptor methodsprotected abstract B createBean(Class<T> beanClass, boolean enabled, Map<javax.enterprise.inject.spi.InterceptionType,Method[]> interceptionMethods, Method aroundConstruct)
public B getBean()
Copyright © 2008–2016 The Apache Software Foundation. All rights reserved.