Class AbstractDecoratorApplyingInstantiator<T>
- java.lang.Object
-
- org.jboss.weld.injection.producer.ForwardingInstantiator<T>
-
- org.jboss.weld.injection.producer.AbstractDecoratorApplyingInstantiator<T>
-
- All Implemented Interfaces:
Instantiator<T>
- Direct Known Subclasses:
SubclassDecoratorApplyingInstantiator
public abstract class AbstractDecoratorApplyingInstantiator<T> extends ForwardingInstantiator<T>
Common functionality for an instantiator capable of applying decorators to a given instance.- Author:
- Jozef Hartinger
- See Also:
SubclassDecoratorApplyingInstantiator,ProxyDecoratorApplyingSessionBeanInstantiator
-
-
Constructor Summary
Constructors Constructor Description AbstractDecoratorApplyingInstantiator(String contextId, Instantiator<T> delegate, Bean<T> bean, List<Decorator<?>> decorators, Class<? extends T> implementationClass)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract TapplyDecorators(T instance, CreationalContext<T> creationalContext, InjectionPoint originalInjectionPoint, BeanManagerImpl manager)Bean<T>getBean()List<Decorator<?>>getDecorators()protected TgetOuterDelegate(T instance, CreationalContext<T> creationalContext, InjectionPoint originalInjectionPoint, BeanManagerImpl manager)Class<T>getProxyClass()booleanhasDecoratorSupport()Indicates whether instances created by this Instantiator support decorators.TnewInstance(CreationalContext<T> ctx, BeanManagerImpl manager)protected voidregisterOuterDecorator(ProxyObject instance, T outerDelegate)-
Methods inherited from class org.jboss.weld.injection.producer.ForwardingInstantiator
delegate, getConstructor, hasInterceptorSupport
-
-
-
-
Method Detail
-
newInstance
public T newInstance(CreationalContext<T> ctx, BeanManagerImpl manager)
- Specified by:
newInstancein interfaceInstantiator<T>- Overrides:
newInstancein classForwardingInstantiator<T>
-
applyDecorators
protected abstract T applyDecorators(T instance, CreationalContext<T> creationalContext, InjectionPoint originalInjectionPoint, BeanManagerImpl manager)
-
getOuterDelegate
protected T getOuterDelegate(T instance, CreationalContext<T> creationalContext, InjectionPoint originalInjectionPoint, BeanManagerImpl manager)
-
registerOuterDecorator
protected void registerOuterDecorator(ProxyObject instance, T outerDelegate)
-
hasDecoratorSupport
public boolean hasDecoratorSupport()
Description copied from interface:InstantiatorIndicates whether instances created by this Instantiator support decorators.- Specified by:
hasDecoratorSupportin interfaceInstantiator<T>- Overrides:
hasDecoratorSupportin classForwardingInstantiator<T>
-
-