javax.inject.manager
Interface InjectionPoint


public interface InjectionPoint

Provides access to metadata about the injection point into which a dependent object is injected.

Author:
Gavin King, Pete Muir

Method Summary
<T extends java.lang.annotation.Annotation>
T
getAnnotation(java.lang.Class<T> annotationType)
          Get the annotation instance for the given annotation type of the field in the case of field injection, or annotations of the parameter in the case of method parameter or constructor parameter injection.
 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()
          Get the declared binding types of the 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Ó.
 java.lang.reflect.Member getMember()
          Get the Field object in the case of field injection, the Method object in the case of method parameter injection or the Constructor object in the case of constructor parameter injection.
 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Ó.
 boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
          Determine if the specified annotation is present on the injection point
 

Method Detail

getType

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Ó.

Returns:
the declared type of the injection point

getBindings

java.util.Set<java.lang.annotation.Annotation> getBindings()
Get the declared binding types of the 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Ó.

Returns:
the declared binding types of the injection point

getBean

Bean<?> getBean()
Get the Bean object representing the Web Bean that defines the injection point

Returns:
the Bean object representing the Web Bean that defines the injection point

getMember

java.lang.reflect.Member getMember()
Get the Field object in the case of field injection, the Method object in the case of method parameter injection or the Constructor object in the case of constructor parameter injection.

Returns:
the member being injected into

getAnnotation

<T extends java.lang.annotation.Annotation> T getAnnotation(java.lang.Class<T> annotationType)
Get the annotation instance for the given annotation type of the field in the case of field injection, or annotations of the parameter in the case of method parameter or constructor parameter injection.

Type Parameters:
T - the type of the annotation
Parameters:
annotationType - the type of the annotation
Returns:
the annotation of the specified annotationType, or null if no such annotation exists

getAnnotations

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.

Returns:
the annotations of the field

isAnnotationPresent

boolean isAnnotationPresent(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Determine if the specified annotation is present on the injection point

Parameters:
annotationType - the type of the annotation
Returns:
true if an annotation of the specified type is present, else false


Copyright © 2008-2009. All Rights Reserved.