org.jboss.webbeans.injection
Class ConstructorInjectionPoint<T>

java.lang.Object
  extended by org.jboss.webbeans.introspector.ForwardingAnnotatedItem<T,S>
      extended by org.jboss.webbeans.introspector.ForwardingAnnotatedMember<T,java.lang.reflect.Constructor<T>>
          extended by org.jboss.webbeans.introspector.ForwardingAnnotatedConstructor<T>
              extended by org.jboss.webbeans.injection.ConstructorInjectionPoint<T>
All Implemented Interfaces:
InjectionPoint, AnnotatedInjectionPoint<T,java.lang.reflect.Constructor<T>>, AnnotatedConstructor<T>, AnnotatedItem<T,java.lang.reflect.Constructor<T>>, AnnotatedMember<T,java.lang.reflect.Constructor<T>>

public class ConstructorInjectionPoint<T>
extends ForwardingAnnotatedConstructor<T>
implements AnnotatedInjectionPoint<T,java.lang.reflect.Constructor<T>>


Field Summary
 
Fields inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
MAPPED_METAANNOTATIONS
 
Constructor Summary
protected ConstructorInjectionPoint(Bean<?> declaringBean, AnnotatedConstructor<T> constructor)
           
 
Method Summary
protected  AnnotatedConstructor<T> delegate()
          Gets the annotated item
 java.lang.annotation.Annotation[] getAnnotations()
          Get the annotations of the field in the case of field injection, or annotations of the parameter in the case of method parameter or constructor parameter injection.
 Bean<?> getBean()
          Get the Bean object representing the Web Bean that defines the injection point
 java.util.Set<java.lang.annotation.Annotation> getBindings()
          Gets the binding types for this element
 java.util.List<ParameterInjectionPoint<?>> getParameters()
          Gets all parameters to the constructor
protected  java.lang.Object[] getParameterValues(java.util.List<ParameterInjectionPoint<?>> parameters, java.lang.Object specialVal, java.lang.Class<? extends java.lang.annotation.Annotation> specialParam, ManagerImpl manager, CreationalContext<?> creationalContext)
          Helper method for getting the current parameter values from a list of annotated parameters.
 java.lang.reflect.Type getType()
          Get the declared type of injection point If the injection point is declared in XML, the type and binding types are determined according to Section 10.8, �Specifying API types and binding types�.
 void inject(java.lang.Object declaringInstance, java.lang.Object value)
          Injects an instance
 T newInstance(ManagerImpl manager, CreationalContext<?> creationalContext)
           
static
<T> ConstructorInjectionPoint<T>
of(Bean<?> declaringBean, AnnotatedConstructor<T> constructor)
           
 
Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedConstructor
getAnnotatedParameters, getDeclaringClass, getSignature, newInstance
 
Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedMember
getMember
 
Methods inherited from class org.jboss.webbeans.introspector.ForwardingAnnotatedItem
equals, getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, hashCode, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isParameterizedType, isProxyable, isPublic, isStatic, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface javax.inject.manager.InjectionPoint
getAnnotation, getMember, isAnnotationPresent
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedItem
getActualTypeArguments, getAnnotation, getAnnotationsAsSet, getAnnotationStore, getBindingsAsArray, getDeclaredMetaAnnotations, getFlattenedTypeHierarchy, getMetaAnnotations, getMetaAnnotationsAsArray, getName, getRawType, isAnnotationPresent, isAssignableFrom, isAssignableFrom, isDeclaredAnnotationPresent, isFinal, isParameterizedType, isProxyable, isPublic, isStatic
 
Methods inherited from interface org.jboss.webbeans.introspector.AnnotatedMember
getMember
 

Constructor Detail

ConstructorInjectionPoint

protected ConstructorInjectionPoint(Bean<?> declaringBean,
                                    AnnotatedConstructor<T> constructor)
Method Detail

of

public static <T> ConstructorInjectionPoint<T> of(Bean<?> declaringBean,
                                                  AnnotatedConstructor<T> constructor)

delegate

protected AnnotatedConstructor<T> delegate()
Description copied from class: ForwardingAnnotatedItem
Gets the annotated item

Specified by:
delegate in class ForwardingAnnotatedConstructor<T>
Returns:
The annotated item

getAnnotations

public java.lang.annotation.Annotation[] getAnnotations()
Description copied from interface: InjectionPoint
Get the annotations of the field in the case of field injection, or annotations of the parameter in the case of method parameter or constructor parameter injection.

Specified by:
getAnnotations in interface InjectionPoint
Returns:
the annotations of the field

getBean

public Bean<?> getBean()
Description copied from interface: InjectionPoint
Get the Bean object representing the Web Bean that defines the injection point

Specified by:
getBean in interface InjectionPoint
Returns:
the Bean object representing the Web Bean that defines the injection point

getBindings

public java.util.Set<java.lang.annotation.Annotation> getBindings()
Description copied from interface: AnnotatedItem
Gets the binding types for this element

Specified by:
getBindings in interface InjectionPoint
Specified by:
getBindings in interface AnnotatedItem<T,java.lang.reflect.Constructor<T>>
Overrides:
getBindings in class ForwardingAnnotatedItem<T,java.lang.reflect.Constructor<T>>
Returns:
the declared binding types of the injection point
See Also:
AnnotatedItem

newInstance

public T newInstance(ManagerImpl manager,
                     CreationalContext<?> creationalContext)

getParameters

public java.util.List<ParameterInjectionPoint<?>> getParameters()
Description copied from interface: AnnotatedConstructor
Gets all parameters to the constructor

Specified by:
getParameters in interface AnnotatedConstructor<T>
Overrides:
getParameters in class ForwardingAnnotatedConstructor<T>
Returns:
A set of abstracted parameters. Returns an empty set if there are no parameters

inject

public void inject(java.lang.Object declaringInstance,
                   java.lang.Object value)
Description copied from interface: AnnotatedInjectionPoint
Injects an instance

Specified by:
inject in interface AnnotatedInjectionPoint<T,java.lang.reflect.Constructor<T>>
Parameters:
declaringInstance - The instance to inject into
value - The value to inject

getParameterValues

protected java.lang.Object[] getParameterValues(java.util.List<ParameterInjectionPoint<?>> parameters,
                                                java.lang.Object specialVal,
                                                java.lang.Class<? extends java.lang.annotation.Annotation> specialParam,
                                                ManagerImpl manager,
                                                CreationalContext<?> creationalContext)
Helper method for getting the current parameter values from a list of annotated parameters.

Parameters:
parameters - The list of annotated parameter to look up
manager - The Web Beans manager
Returns:
The object array of looked up values

getType

public java.lang.reflect.Type getType()
Description copied from interface: InjectionPoint
Get the declared type of injection point If the injection point is declared in XML, the type and binding types are determined according to Section 10.8, �Specifying API types and binding types�.

Specified by:
getType in interface InjectionPoint
Specified by:
getType in interface AnnotatedItem<T,java.lang.reflect.Constructor<T>>
Overrides:
getType in class ForwardingAnnotatedItem<T,java.lang.reflect.Constructor<T>>
Returns:
the declared type of the injection point


Copyright © 2011. All Rights Reserved.