Package org.jboss.weld.bean
Class InterceptorImpl<T>
- java.lang.Object
-
- org.jboss.weld.util.bean.ForwardingBeanAttributes<T>
-
- org.jboss.weld.bean.CommonBean<T>
-
- org.jboss.weld.bean.RIBean<T>
-
- org.jboss.weld.bean.AbstractBean<T,Class<T>>
-
- org.jboss.weld.bean.AbstractClassBean<T>
-
- org.jboss.weld.bean.ManagedBean<T>
-
- org.jboss.weld.bean.InterceptorImpl<T>
-
- All Implemented Interfaces:
Contextual<T>
,Bean<T>
,BeanAttributes<T>
,Interceptor<T>
,PassivationCapable
,ClassBean<T>
,DecorableBean<T>
,WeldBean<T>
public class InterceptorImpl<T> extends ManagedBean<T> implements Interceptor<T>
- Author:
- Marius Bogoevici
-
-
Field Summary
-
Fields inherited from class org.jboss.weld.bean.AbstractClassBean
annotatedType, enhancedAnnotatedItem
-
Fields inherited from class org.jboss.weld.bean.AbstractBean
type
-
Fields inherited from class org.jboss.weld.bean.RIBean
beanManager
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
InterceptorImpl(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<Annotation>
getInterceptorBindings()
Obtains the interceptor bindings of the interceptor.InterceptorClassMetadata<T>
getInterceptorMetadata()
void
initializeAfterBeanDiscovery()
In particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g.Object
intercept(InterceptionType type, T instance, javax.interceptor.InvocationContext ctx)
Invokes the specified kind of lifecycle callback or method invocation interception upon the given interceptor instance.boolean
intercepts(InterceptionType type)
Determines if the interceptor intercepts the specified kind of lifecycle callback or method invocation.boolean
isSerializable()
static <T> InterceptorImpl<T>
of(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)
String
toString()
-
Methods inherited from class org.jboss.weld.bean.ManagedBean
checkBeanImplementation, checkType, create, destroy, internalInitialize, isInterceptionCandidate, isPassivationCapableBean, isPassivationCapableDependency, isProxyable, setProducer, specialize
-
Methods inherited from class org.jboss.weld.bean.AbstractClassBean
cleanupAfterBoot, getAnnotated, getDecorators, getEnhancedAnnotated, getInjectionPoints, getInjectionTarget, getInterceptors, getProducer, hasDecorators, hasInterceptors, initType, preSpecialize, setInjectionTarget, setProducer
-
Methods inherited from class org.jboss.weld.bean.AbstractBean
checkSpecialization, getSpecializedBeans, getType, isDependent, isIgnoreFinalMethods, isProxyRequired, isSpecializing, postSpecialize, preInitialize, setIgnoreFinalMethods
-
Methods inherited from class org.jboss.weld.bean.RIBean
getBeanClass, getBeanManager, getContextualInstanceStrategy, getQualifierInstances, initialize, isNormalScoped, setAttributes
-
Methods inherited from class org.jboss.weld.bean.CommonBean
attributes, equals, getId, getIdentifier, hashCode, isNullable, unwrap
-
Methods inherited from class org.jboss.weld.util.bean.ForwardingBeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface javax.enterprise.inject.spi.Bean
getBeanClass, getInjectionPoints, isNullable
-
Methods inherited from interface javax.enterprise.inject.spi.BeanAttributes
getName, getQualifiers, getScope, getStereotypes, getTypes, isAlternative
-
Methods inherited from interface org.jboss.weld.bean.ClassBean
getBeanManager
-
Methods inherited from interface javax.enterprise.context.spi.Contextual
create, destroy
-
Methods inherited from interface javax.enterprise.inject.spi.PassivationCapable
getId
-
Methods inherited from interface org.jboss.weld.bean.WeldBean
getIdentifier, getPriority
-
-
-
-
Constructor Detail
-
InterceptorImpl
protected InterceptorImpl(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)
-
-
Method Detail
-
of
public static <T> InterceptorImpl<T> of(BeanAttributes<T> attributes, EnhancedAnnotatedType<T> type, BeanManagerImpl beanManager)
-
getInterceptorBindings
public Set<Annotation> getInterceptorBindings()
Description copied from interface:Interceptor
Obtains the interceptor bindings of the interceptor.
- Specified by:
getInterceptorBindings
in interfaceInterceptor<T>
- Returns:
- the set of interceptor bindings
-
getInterceptorMetadata
public InterceptorClassMetadata<T> getInterceptorMetadata()
-
intercept
public Object intercept(InterceptionType type, T instance, javax.interceptor.InvocationContext ctx)
Description copied from interface:Interceptor
Invokes the specified kind of lifecycle callback or method invocation interception upon the given interceptor instance.
- Specified by:
intercept
in interfaceInterceptor<T>
- Parameters:
type
- the kind of interceptioninstance
- the interceptor instance to invokectx
- the context for the invocation- Returns:
- the invocation return value
-
intercepts
public boolean intercepts(InterceptionType type)
Description copied from interface:Interceptor
Determines if the interceptor intercepts the specified kind of lifecycle callback or method invocation.
- Specified by:
intercepts
in interfaceInterceptor<T>
- Parameters:
type
- the kind of interception- Returns:
- returns true if the interceptor intercepts callbacks or business methods of the given type, and false otherwise.
-
isSerializable
public boolean isSerializable()
-
initializeAfterBeanDiscovery
public void initializeAfterBeanDiscovery()
Description copied from class:RIBean
In particular cases, the deployer must perform some initialization operations only after all beans have been deployed (e.g. for initializing decorators taking into account the possibility of having custom decorators which are deployed through portable extensions)- Overrides:
initializeAfterBeanDiscovery
in classManagedBean<T>
-
toString
public String toString()
- Overrides:
toString
in classManagedBean<T>
-
-