Package org.jboss.weld.injection
Class ConstructorInjectionPoint<T>
- java.lang.Object
-
- org.jboss.weld.injection.ConstructorInjectionPoint<T>
-
- Type Parameters:
T
-
- All Implemented Interfaces:
jakarta.enterprise.inject.spi.InjectionPoint
,WeldInjectionPointAttributes<T,Constructor<T>>
- Direct Known Subclasses:
ProxyClassConstructorInjectionPointWrapper
public class ConstructorInjectionPoint<T> extends Object
High-level representation of an injected constructor. This class does not need to be serializable because it is never injected.- Author:
- Pete Muir, Jozef Hartinger
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
hasTransientReferenceParameter
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConstructorInjectionPoint(EnhancedAnnotatedConstructor<T> constructor, jakarta.enterprise.inject.spi.Bean<T> declaringBean, Class<?> declaringComponentClass, InjectionPointFactory factory, BeanManagerImpl manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object obj)
jakarta.enterprise.inject.spi.AnnotatedConstructor<T>
getAnnotated()
jakarta.enterprise.inject.spi.Bean<?>
getBean()
jakarta.enterprise.inject.spi.AnnotatedConstructor<T>
getComponentConstructor()
Set<jakarta.enterprise.inject.spi.InjectionPoint>
getInjectionPoints()
Returns a set ofInjectionPoint
instances of this constructor/method.Member
getMember()
List<ParameterInjectionPoint<?,X>>
getParameterInjectionPoints()
Object[]
getParameterValues(BeanManagerImpl manager, jakarta.enterprise.context.spi.CreationalContext<?> ctx, jakarta.enterprise.context.spi.CreationalContext<?> transientReference)
Helper method for getting the current parameter values from a list of annotated parameters.<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()
ConstructorSignature
getSignature()
Type
getType()
int
hashCode()
boolean
isDelegate()
boolean
isTransient()
protected T
newInstance(Object[] parameterValues)
T
newInstance(BeanManagerImpl manager, jakarta.enterprise.context.spi.CreationalContext<?> ctx)
String
toString()
-
-
-
Constructor Detail
-
ConstructorInjectionPoint
protected ConstructorInjectionPoint(EnhancedAnnotatedConstructor<T> constructor, jakarta.enterprise.inject.spi.Bean<T> declaringBean, Class<?> declaringComponentClass, InjectionPointFactory factory, BeanManagerImpl manager)
-
-
Method Detail
-
newInstance
public T newInstance(BeanManagerImpl manager, jakarta.enterprise.context.spi.CreationalContext<?> ctx)
-
getParameterValues
public Object[] getParameterValues(BeanManagerImpl manager, jakarta.enterprise.context.spi.CreationalContext<?> ctx, jakarta.enterprise.context.spi.CreationalContext<?> transientReference)
Helper method for getting the current parameter values from a list of annotated parameters.- Parameters:
parameters
- The list of annotated parameter to look upmanager
- The Bean manager- Returns:
- The object array of looked up values
-
getAnnotated
public jakarta.enterprise.inject.spi.AnnotatedConstructor<T> getAnnotated()
- Specified by:
getAnnotated
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getSignature
public ConstructorSignature getSignature()
-
getComponentConstructor
public jakarta.enterprise.inject.spi.AnnotatedConstructor<T> getComponentConstructor()
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
getType
public Type getType()
- Specified by:
getType
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getQualifiers
public Set<Annotation> getQualifiers()
- Specified by:
getQualifiers
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getBean
public jakarta.enterprise.inject.spi.Bean<?> getBean()
- Specified by:
getBean
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
isDelegate
public boolean isDelegate()
- Specified by:
isDelegate
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
isTransient
public boolean isTransient()
- Specified by:
isTransient
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
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()
- Specified by:
getMember
in interfacejakarta.enterprise.inject.spi.InjectionPoint
-
getParameterInjectionPoints
public List<ParameterInjectionPoint<?,X>> getParameterInjectionPoints()
-
getInjectionPoints
public Set<jakarta.enterprise.inject.spi.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.
-
-