Class SubclassedComponentInstantiator<T>
- java.lang.Object
-
- org.jboss.weld.injection.producer.AbstractInstantiator<T>
-
- org.jboss.weld.injection.producer.SubclassedComponentInstantiator<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
Instantiator<T>
public class SubclassedComponentInstantiator<T> extends AbstractInstantiator<T>
Instantiates an enhanced subclass of a given component class. This class is thread-safe.- Author:
- Jozef Hartinger
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SubclassedComponentInstantiator(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, ConstructorInjectionPoint<T> originalConstructor, BeanManagerImpl manager)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Class<T>
createEnhancedSubclass(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl manager)
static <T> SubclassedComponentInstantiator<T>
forInterceptedDecoratedBean(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, AbstractInstantiator<T> delegate, BeanManagerImpl manager)
static <T> SubclassedComponentInstantiator<T>
forSubclassedEjb(EnhancedAnnotatedType<T> componentType, EnhancedAnnotatedType<T> subclass, jakarta.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl manager)
Constructor<T>
getConstructor()
Returns the constructor used for instantiation.ConstructorInjectionPoint<T>
getConstructorInjectionPoint()
Note that this method return aConstructorInjectionPoint
that represents the constructor of an enhanced subclass.boolean
hasDecoratorSupport()
Indicates whether instances created by this Instantiator support decorators.boolean
hasInterceptorSupport()
Indicates whether instances created by this Instantiator support interception.protected EnhancedAnnotatedConstructor<T>
initEnhancedSubclass(BeanManagerImpl manager, EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<?> bean, ConstructorInjectionPoint<T> originalConstructorInjectionPoint)
String
toString()
-
Methods inherited from class org.jboss.weld.injection.producer.AbstractInstantiator
newInstance
-
-
-
-
Constructor Detail
-
SubclassedComponentInstantiator
protected SubclassedComponentInstantiator(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, ConstructorInjectionPoint<T> originalConstructor, BeanManagerImpl manager)
-
-
Method Detail
-
forSubclassedEjb
public static <T> SubclassedComponentInstantiator<T> forSubclassedEjb(EnhancedAnnotatedType<T> componentType, EnhancedAnnotatedType<T> subclass, jakarta.enterprise.inject.spi.Bean<T> bean, BeanManagerImpl manager)
-
forInterceptedDecoratedBean
public static <T> SubclassedComponentInstantiator<T> forInterceptedDecoratedBean(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<T> bean, AbstractInstantiator<T> delegate, BeanManagerImpl manager)
-
initEnhancedSubclass
protected EnhancedAnnotatedConstructor<T> initEnhancedSubclass(BeanManagerImpl manager, EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<?> bean, ConstructorInjectionPoint<T> originalConstructorInjectionPoint)
-
createEnhancedSubclass
protected Class<T> createEnhancedSubclass(EnhancedAnnotatedType<T> type, jakarta.enterprise.inject.spi.Bean<?> bean, BeanManagerImpl manager)
-
hasInterceptorSupport
public boolean hasInterceptorSupport()
Description copied from interface:Instantiator
Indicates whether instances created by this Instantiator support interception.
-
hasDecoratorSupport
public boolean hasDecoratorSupport()
Description copied from interface:Instantiator
Indicates whether instances created by this Instantiator support decorators.
-
getConstructorInjectionPoint
public ConstructorInjectionPoint<T> getConstructorInjectionPoint()
Note that this method return aConstructorInjectionPoint
that represents the constructor of an enhanced subclass. UsegetConstructor()
to get the matching component class constructor.- Specified by:
getConstructorInjectionPoint
in classAbstractInstantiator<T>
-
getConstructor
public Constructor<T> getConstructor()
Description copied from interface:Instantiator
Returns the constructor used for instantiation. If an enhanced subclass is used for a component instance, this method returns the matching constructor of the original component class.
-
-