Package org.jboss.weld.injection
Class ConstructorInjectionPoint<T>
- java.lang.Object
-
- org.jboss.weld.injection.ConstructorInjectionPoint<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
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 booleanhasTransientReferenceParameter
-
Constructor Summary
Constructors Modifier Constructor Description protectedConstructorInjectionPoint(EnhancedAnnotatedConstructor<T> constructor, Bean<T> declaringBean, Class<?> declaringComponentClass, InjectionPointFactory factory, BeanManagerImpl manager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)AnnotatedConstructor<T>getAnnotated()Obtain an instance ofAnnotatedFieldorAnnotatedParameter, depending upon whether the injection point is an injected field or a constructor/method parameter.Bean<?>getBean()Get theBeanobject representing the bean that defines the injection point.AnnotatedConstructor<T>getComponentConstructor()Set<InjectionPoint>getInjectionPoints()Returns a set ofInjectionPointinstances of this constructor/method.MembergetMember()Get theFieldobject in the case of field injection, theMethodobject in the case of method parameter injection or theConstructorobject in the case of constructor parameter injection.List<ParameterInjectionPoint<?,X>>getParameterInjectionPoints()Object[]getParameterValues(BeanManagerImpl manager, CreationalContext<?> ctx, 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()Get the required qualifiers of the injection point.ConstructorSignaturegetSignature()TypegetType()Get the required type of injection point.inthashCode()booleanisDelegate()Determines if the injection point is a decorator delegate injection point.booleanisTransient()Determines if the injection is a transient field.protected TnewInstance(Object[] parameterValues)TnewInstance(BeanManagerImpl manager, CreationalContext<?> ctx)StringtoString()
-
-
-
Constructor Detail
-
ConstructorInjectionPoint
protected ConstructorInjectionPoint(EnhancedAnnotatedConstructor<T> constructor, Bean<T> declaringBean, Class<?> declaringComponentClass, InjectionPointFactory factory, BeanManagerImpl manager)
-
-
Method Detail
-
newInstance
public T newInstance(BeanManagerImpl manager, CreationalContext<?> ctx)
-
getParameterValues
public Object[] getParameterValues(BeanManagerImpl manager, CreationalContext<?> ctx, 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 AnnotatedConstructor<T> getAnnotated()
Description copied from interface:InjectionPointObtain an instance ofAnnotatedFieldorAnnotatedParameter, depending upon whether the injection point is an injected field or a constructor/method parameter.- Specified by:
getAnnotatedin interfaceInjectionPoint- Returns:
- an
AnnotatedFieldorAnnotatedParameter
-
getSignature
public ConstructorSignature getSignature()
-
getComponentConstructor
public AnnotatedConstructor<T> getComponentConstructor()
-
hashCode
public int hashCode()
-
equals
public boolean equals(Object obj)
-
getType
public Type getType()
Description copied from interface:InjectionPointGet the required type of injection point.- Specified by:
getTypein interfaceInjectionPoint- Returns:
- the required type
-
getQualifiers
public Set<Annotation> getQualifiers()
Description copied from interface:InjectionPointGet the required qualifiers of the injection point.- Specified by:
getQualifiersin interfaceInjectionPoint- Returns:
- the required qualifiers
-
getBean
public Bean<?> getBean()
Description copied from interface:InjectionPointGet theBeanobject representing the bean that defines the injection point. If the injection point does not belong to a bean, return a null value.- Specified by:
getBeanin interfaceInjectionPoint- Returns:
- the
Beanobject 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:InjectionPointDetermines if the injection point is a decorator delegate injection point.- Specified by:
isDelegatein interfaceInjectionPoint- Returns:
- true if the injection point is a decorator delegate injection point, and false otherwise
-
isTransient
public boolean isTransient()
Description copied from interface:InjectionPointDetermines if the injection is a transient field.- Specified by:
isTransientin 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:WeldInjectionPointAttributesReturns an instance of a given qualifier annotation or null if a given qualifier is not present on the injection point.- Specified by:
getQualifierin interfaceWeldInjectionPointAttributes<T,X>
-
getMember
public Member getMember()
Description copied from interface:InjectionPointGet theFieldobject in the case of field injection, theMethodobject in the case of method parameter injection or theConstructorobject in the case of constructor parameter injection.- Specified by:
getMemberin interfaceInjectionPoint- Returns:
- the member
-
getParameterInjectionPoints
public List<ParameterInjectionPoint<?,X>> getParameterInjectionPoints()
-
getInjectionPoints
public Set<InjectionPoint> getInjectionPoints()
Returns a set ofInjectionPointinstances of this constructor/method. This set never contains aSpecialParameterInjectionPointand is therefore suitable for use outside of Weld. The returned set is immutable.
-
-