Package org.apache.webbeans.portable
Class AbstractProducer<T>
- java.lang.Object
-
- org.apache.webbeans.portable.AbstractProducer<T>
-
- All Implemented Interfaces:
javax.enterprise.inject.spi.Producer<T>
- Direct Known Subclasses:
BaseProducerProducer,BeanManagerProducer,BeanMetadataProducer,EventProducer,ExtensionProducer,InjectionPointProducer,InjectionTargetImpl,InstanceProducer,MetadataProducer,ProviderBasedProducer,RequestContextControllerProducer
public abstract class AbstractProducer<T> extends Object implements javax.enterprise.inject.spi.Producer<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected Set<javax.enterprise.inject.spi.InjectionPoint>injectionPointsprotected InterceptorResolutionService.BeanInterceptorInfointerceptorInfoprotected Map<Method,List<javax.enterprise.inject.spi.Interceptor<?>>>methodInterceptorsprotected StringpassivationIdprotected Class<? extends T>proxyClassprotected InterceptorDecoratorProxyFactoryproxyFactory
-
Constructor Summary
Constructors Constructor Description AbstractProducer()AbstractProducer(Set<javax.enterprise.inject.spi.InjectionPoint> points)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voiddefineInterceptorStack(javax.enterprise.inject.spi.Bean<T> bean, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, WebBeansContext webBeansContext)Configure bean instance interceptor stack.protected voiddefineLifecycleInterceptors(javax.enterprise.inject.spi.Bean<T> bean, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, WebBeansContext webBeansContext)voiddispose(T instance)protected List<javax.enterprise.inject.spi.Decorator<?>>filterDecorators(T instance, List<javax.enterprise.inject.spi.Decorator<?>> decorators)Set<javax.enterprise.inject.spi.InjectionPoint>getInjectionPoints()InterceptorResolutionService.BeanInterceptorInfogetInterceptorInfo()protected Map<Method,List<javax.enterprise.inject.spi.Interceptor<?>>>getMethodInterceptors()protected InterceptorDecoratorProxyFactorygetProxyFactory()protected booleanhasInterceptorInfo()protected booleanisDelegateInjection(CreationalContextImpl<?> cc)protected booleanneedsProxy()protected abstract Tproduce(Map<javax.enterprise.inject.spi.Interceptor<?>,?> interceptorInstances, CreationalContextImpl<T> creationalContext)Tproduce(javax.enterprise.context.spi.CreationalContext<T> creationalContext)protected TunwrapProxyInstance(T probableProxyInstance)Helper method to unwrap the internal proxy instance.
-
-
-
Field Detail
-
injectionPoints
protected Set<javax.enterprise.inject.spi.InjectionPoint> injectionPoints
-
passivationId
protected String passivationId
-
interceptorInfo
protected InterceptorResolutionService.BeanInterceptorInfo interceptorInfo
-
proxyFactory
protected InterceptorDecoratorProxyFactory proxyFactory
-
-
Constructor Detail
-
AbstractProducer
public AbstractProducer()
-
AbstractProducer
public AbstractProducer(Set<javax.enterprise.inject.spi.InjectionPoint> points)
-
-
Method Detail
-
defineInterceptorStack
public void defineInterceptorStack(javax.enterprise.inject.spi.Bean<T> bean, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, WebBeansContext webBeansContext)
Configure bean instance interceptor stack. This method gets invoked in the ValidateBean phase and will fill all the interceptor information into the given InjectionTargetBean
-
getInjectionPoints
public Set<javax.enterprise.inject.spi.InjectionPoint> getInjectionPoints()
- Specified by:
getInjectionPointsin interfacejavax.enterprise.inject.spi.Producer<T>
-
getInterceptorInfo
public InterceptorResolutionService.BeanInterceptorInfo getInterceptorInfo()
-
produce
public T produce(javax.enterprise.context.spi.CreationalContext<T> creationalContext)
- Specified by:
producein interfacejavax.enterprise.inject.spi.Producer<T>
-
filterDecorators
protected List<javax.enterprise.inject.spi.Decorator<?>> filterDecorators(T instance, List<javax.enterprise.inject.spi.Decorator<?>> decorators)
-
dispose
public void dispose(T instance)
- Specified by:
disposein interfacejavax.enterprise.inject.spi.Producer<T>
-
produce
protected abstract T produce(Map<javax.enterprise.inject.spi.Interceptor<?>,?> interceptorInstances, CreationalContextImpl<T> creationalContext)
-
getProxyFactory
protected InterceptorDecoratorProxyFactory getProxyFactory()
-
getMethodInterceptors
protected Map<Method,List<javax.enterprise.inject.spi.Interceptor<?>>> getMethodInterceptors()
-
needsProxy
protected boolean needsProxy()
-
hasInterceptorInfo
protected boolean hasInterceptorInfo()
-
isDelegateInjection
protected boolean isDelegateInjection(CreationalContextImpl<?> cc)
-
unwrapProxyInstance
protected T unwrapProxyInstance(T probableProxyInstance)
Helper method to unwrap the internal proxy instance. Returns the instance directly if this is not a proxied instance.
-
defineLifecycleInterceptors
protected void defineLifecycleInterceptors(javax.enterprise.inject.spi.Bean<T> bean, javax.enterprise.inject.spi.AnnotatedType<T> annotatedType, WebBeansContext webBeansContext)
-
-