Package org.jboss.weld.injection
Class ProxyClassConstructorInjectionPointWrapper<T>
- java.lang.Object
-
- org.jboss.weld.injection.ConstructorInjectionPoint<T>
-
- org.jboss.weld.injection.ProxyClassConstructorInjectionPointWrapper<T>
-
- All Implemented Interfaces:
InjectionPoint
,WeldInjectionPointAttributes<T,Constructor<T>>
public class ProxyClassConstructorInjectionPointWrapper<T> extends ConstructorInjectionPoint<T>
A wrapper on aConstructorInjectionPoint
, to be used if a proxy subclass is instantiated instead of the original (e.g. because the original is an abstractDecorator
) This class is immutable.- Author:
- Marius Bogoevici, Ales Justin, Jozef Hartinger
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
hasTransientReferenceParameter
-
Constructor Summary
Constructors Constructor Description ProxyClassConstructorInjectionPointWrapper(Bean<T> declaringBean, Class<?> declaringComponentClass, EnhancedAnnotatedConstructor<T> weldConstructor, ConstructorInjectionPoint<T> originalConstructorInjectionPoint, BeanManagerImpl manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
Bean<?>
getBean()
Get theBean
object representing the bean that defines the injection point.AnnotatedConstructor<T>
getComponentConstructor()
Set<InjectionPoint>
getInjectionPoints()
Returns a set ofInjectionPoint
instances of this constructor/method.Member
getMember()
Get theField
object in the case of field injection, theMethod
object in the case of method parameter injection or theConstructor
object in the case of constructor parameter injection.List<ParameterInjectionPoint<?,T>>
getParameterInjectionPoints()
<A extends Annotation>
AgetQualifier(Class<A> annotationType)
Returns an instance of a given qualifier annotation or null if a given qualifier is not present on the injection point.Set<Annotation>
getQualifiers()
Get the required qualifiers of the injection point.Type
getType()
Get the required type of injection point.int
hashCode()
boolean
isDelegate()
Determines if the injection point is a decorator delegate injection point.boolean
isTransient()
Determines if the injection is a transient field.protected T
newInstance(Object[] parameterValues)
String
toString()
-
Methods inherited from class org.jboss.weld.injection.ConstructorInjectionPoint
getAnnotated, getParameterValues, getSignature, newInstance
-
-
-
-
Constructor Detail
-
ProxyClassConstructorInjectionPointWrapper
public ProxyClassConstructorInjectionPointWrapper(Bean<T> declaringBean, Class<?> declaringComponentClass, EnhancedAnnotatedConstructor<T> weldConstructor, ConstructorInjectionPoint<T> originalConstructorInjectionPoint, BeanManagerImpl manager)
-
-
Method Detail
-
getParameterInjectionPoints
public List<ParameterInjectionPoint<?,T>> getParameterInjectionPoints()
-
newInstance
protected T newInstance(Object[] parameterValues)
- Overrides:
newInstance
in classConstructorInjectionPoint<T>
-
getComponentConstructor
public AnnotatedConstructor<T> getComponentConstructor()
- Overrides:
getComponentConstructor
in classConstructorInjectionPoint<T>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classConstructorInjectionPoint<T>
-
equals
public boolean equals(Object obj)
- Overrides:
equals
in classConstructorInjectionPoint<T>
-
getType
public Type getType()
Description copied from interface:InjectionPoint
Get the required type of injection point.- Specified by:
getType
in interfaceInjectionPoint
- Returns:
- the required type
-
getQualifiers
public Set<Annotation> getQualifiers()
Description copied from interface:InjectionPoint
Get the required qualifiers of the injection point.- Specified by:
getQualifiers
in interfaceInjectionPoint
- Returns:
- the required qualifiers
-
getBean
public Bean<?> getBean()
Description copied from interface:InjectionPoint
Get theBean
object representing the bean that defines the injection point. If the injection point does not belong to a bean, return a null value.- Specified by:
getBean
in interfaceInjectionPoint
- Returns:
- the
Bean
object representing bean that defines the injection point, of null if the injection point does not belong to a bean
-
isDelegate
public boolean isDelegate()
Description copied from interface:InjectionPoint
Determines if the injection point is a decorator delegate injection point.- Specified by:
isDelegate
in interfaceInjectionPoint
- Returns:
- true if the injection point is a decorator delegate injection point, and false otherwise
-
isTransient
public boolean isTransient()
Description copied from interface:InjectionPoint
Determines if the injection is a transient field.- Specified by:
isTransient
in interfaceInjectionPoint
- Returns:
- true if the injection point is a transient field, and false otherwise
-
getQualifier
public <A extends Annotation> A getQualifier(Class<A> annotationType)
Description copied from interface:WeldInjectionPointAttributes
Returns an instance of a given qualifier annotation or null if a given qualifier is not present on the injection point.- Specified by:
getQualifier
in interfaceWeldInjectionPointAttributes<T,X>
-
getMember
public Member getMember()
Description copied from interface:InjectionPoint
Get theField
object in the case of field injection, theMethod
object in the case of method parameter injection or theConstructor
object in the case of constructor parameter injection.- Specified by:
getMember
in interfaceInjectionPoint
- Returns:
- the member
-
getInjectionPoints
public Set<InjectionPoint> getInjectionPoints()
Returns a set ofInjectionPoint
instances of this constructor/method. This set never contains aSpecialParameterInjectionPoint
and is therefore suitable for use outside of Weld. The returned set is immutable.
-
-