public class BuilderInterceptorBean extends Object implements Interceptor<BuilderInterceptorInstance>, Prioritized, PassivationCapable
| Constructor and Description |
|---|
BuilderInterceptorBean(Set<Annotation> interceptorBindings,
InterceptionType type,
int priority,
BeanManagerImpl beanManager,
java.util.function.BiFunction<javax.interceptor.InvocationContext,Bean<?>,Object> interceptorFunction) |
BuilderInterceptorBean(Set<Annotation> interceptorBindings,
InterceptionType type,
int priority,
BeanManagerImpl beanManager,
java.util.function.Function<javax.interceptor.InvocationContext,Object> interceptorFunction) |
| Modifier and Type | Method and Description |
|---|---|
BuilderInterceptorInstance |
create(CreationalContext<BuilderInterceptorInstance> creationalContext)
Create a new instance of the contextual type.
|
void |
destroy(BuilderInterceptorInstance instance,
CreationalContext<BuilderInterceptorInstance> creationalContext)
Destroy an instance of the contextual type.
|
Class<?> |
getBeanClass()
The bean class of the managed bean or session bean or of the bean that declares the producer method or
field.
|
String |
getId()
A string that uniquely identifies the instance of
Bean or
Contextual. |
Set<InjectionPoint> |
getInjectionPoints()
Obtains the
InjectionPoint objects representing injection points of the bean, that
will be validated by the container at initialization time. |
Set<Annotation> |
getInterceptorBindings()
Obtains the interceptor bindings of the interceptor.
|
String |
getName()
Obtains the EL name of a bean, if it has one.
|
protected WeldCreationalContext<?> |
getParentCreationalContext(CreationalContext<BuilderInterceptorInstance> ctx) |
int |
getPriority()
Returns the priority value of this prioritized element.
|
Set<Annotation> |
getQualifiers()
Obtains the qualifiers of the bean.
|
Class<? extends Annotation> |
getScope()
Obtains the scope of the bean.
|
Set<Class<? extends Annotation>> |
getStereotypes()
Obtains the stereotypes of the bean.
|
Set<Type> |
getTypes()
Obtains the bean types of the bean.
|
Object |
intercept(InterceptionType type,
BuilderInterceptorInstance builderInterceptorInstance,
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 |
isAlternative()
Determines if the bean is an alternative.
|
boolean |
isNullable()
Determines if
Contextual.create(CreationalContext) sometimes return a null value. |
public BuilderInterceptorBean(Set<Annotation> interceptorBindings, InterceptionType type, int priority, BeanManagerImpl beanManager, java.util.function.Function<javax.interceptor.InvocationContext,Object> interceptorFunction)
public BuilderInterceptorBean(Set<Annotation> interceptorBindings, InterceptionType type, int priority, BeanManagerImpl beanManager, java.util.function.BiFunction<javax.interceptor.InvocationContext,Bean<?>,Object> interceptorFunction)
public Set<Annotation> getInterceptorBindings()
InterceptorObtains the interceptor bindings of the interceptor.
getInterceptorBindings in interface Interceptor<BuilderInterceptorInstance>public boolean intercepts(InterceptionType type)
InterceptorDetermines if the interceptor intercepts the specified kind of lifecycle callback or method invocation.
intercepts in interface Interceptor<BuilderInterceptorInstance>type - the kind of interceptionpublic Object intercept(InterceptionType type, BuilderInterceptorInstance builderInterceptorInstance, javax.interceptor.InvocationContext ctx) throws Exception
InterceptorInvokes the specified kind of lifecycle callback or method invocation interception upon the given interceptor instance.
intercept in interface Interceptor<BuilderInterceptorInstance>type - the kind of interceptionbuilderInterceptorInstance - the interceptor instance to invokectx - the context for the invocationException - thrown by the target method and/or the following interceptors in the chainpublic Class<?> getBeanClass()
BeangetBeanClass in interface Bean<BuilderInterceptorInstance>public Set<InjectionPoint> getInjectionPoints()
BeanInjectionPoint objects representing injection points of the bean, that
will be validated by the container at initialization time.getInjectionPoints in interface Bean<BuilderInterceptorInstance>public boolean isNullable()
Bean
Determines if Contextual.create(CreationalContext) sometimes return a null value.
As of CDI 1.1 this method is deprecated and can safely always return false.
isNullable in interface Bean<BuilderInterceptorInstance>create() method may return a null value, and false otherwisepublic Set<Type> getTypes()
BeanAttributesgetTypes in interface BeanAttributes<BuilderInterceptorInstance>public Set<Annotation> getQualifiers()
BeanAttributesgetQualifiers in interface BeanAttributes<BuilderInterceptorInstance>public Class<? extends Annotation> getScope()
BeanAttributesgetScope in interface BeanAttributes<BuilderInterceptorInstance>public String getName()
BeanAttributesgetName in interface BeanAttributes<BuilderInterceptorInstance>public Set<Class<? extends Annotation>> getStereotypes()
BeanAttributesgetStereotypes in interface BeanAttributes<BuilderInterceptorInstance>public boolean isAlternative()
BeanAttributesisAlternative in interface BeanAttributes<BuilderInterceptorInstance>protected WeldCreationalContext<?> getParentCreationalContext(CreationalContext<BuilderInterceptorInstance> ctx)
public int getPriority()
PrioritizedReturns the priority value of this prioritized element.
getPriority in interface Prioritizedpublic BuilderInterceptorInstance create(CreationalContext<BuilderInterceptorInstance> creationalContext)
ContextualCreationalContext when obtaining contextual references to inject, in order to ensure
that any dependent objects are associated with the contextual instance that is being created. An implementation may call
CreationalContext.push(Object) between instantiation and injection to help the
container minimize the use of client proxy objects.create in interface Contextual<BuilderInterceptorInstance>creationalContext - the context in which this instance is being createdpublic void destroy(BuilderInterceptorInstance instance, CreationalContext<BuilderInterceptorInstance> creationalContext)
ContextualCreationalContext.release() to allow the container to destroy dependent objects of
the contextual instance.destroy in interface Contextual<BuilderInterceptorInstance>instance - the contextual instance to destroycreationalContext - the context in which this instance was createdpublic String getId()
PassivationCapableBean or
Contextual. It is recommended that the string contain the package name of the class
that implements Bean or Contextual.getId in interface PassivationCapableBean or
ContextualCopyright © 2016. All Rights Reserved.