public class InjectionTargetInformation extends Object
| Constructor and Description | 
|---|
| InjectionTargetInformation(Class<?> type,
                          Constructor<?> constructor,
                          Type genericTypeParamerter,
                          Annotation[] parameterAnnotations)Creates an instance of  InjectionTargetInformationforConstructorinjection. | 
| InjectionTargetInformation(Class<?> type,
                          Field field)Creates an instance of  InjectionTargetInformationforFieldinjection. | 
| InjectionTargetInformation(Class<?> type,
                          Method method,
                          Type genericTypeParamerter,
                          Annotation[] parameterAnnotations)Creates an instance of  InjectionTargetInformationforMethodinjection. | 
| Modifier and Type | Method and Description | 
|---|---|
| AccessibleObject | getAccessibleObject()Returns the  AccessibleObjectof the injection target. | 
| <T> T | getAnnotation(Class<? extends Annotation> annotationClass)Returns the  Annotationobject if an annotation for the specified
 type is present on the injection target, otherwise null. | 
| Annotation[] | getAnnotations()Returns an array of all annotations present on the injection target. | 
| Type | getGenericTypeParameter() | 
| Class<?> | getType()Returns the class object from the injection target. | 
| boolean | isAnnotationPresent(Class<? extends Annotation> annotationClass)Returns true if an annotation for the specified type is present on the
 injection target, else false. | 
public InjectionTargetInformation(Class<?> type, Field field)
InjectionTargetInformation for
 Field injection.type - class object of the injection targetfield - Field object of the injection targetpublic InjectionTargetInformation(Class<?> type, Method method, Type genericTypeParamerter, Annotation[] parameterAnnotations)
InjectionTargetInformation for
 Method injection.type - class object of the method parametermethod - Method object of the injection targetparameterAnnotations - annotations of method parameterpublic InjectionTargetInformation(Class<?> type, Constructor<?> constructor, Type genericTypeParamerter, Annotation[] parameterAnnotations)
InjectionTargetInformation for
 Constructor injection.type - class object of the constructor parameterconstructor - Constructor object of the injection targetparameterAnnotations - annotations of constructor parameterpublic Class<?> getType()
public Annotation[] getAnnotations()
AccessibleObject of the injection target is of type
 Method or Constructor, then the Annotation of the
 AccessibleObject and the corresponding parameter are returned.public AccessibleObject getAccessibleObject()
AccessibleObject of the injection target.AccessibleObject of the injection targetField, 
Method, 
Constructorpublic boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
annotationClass - - the Class object corresponding to the annotation typeNullPointerException - - if the given annotation class is nullpublic <T> T getAnnotation(Class<? extends Annotation> annotationClass)
Annotation object if an annotation for the specified
 type is present on the injection target, otherwise null.
 
 If the AccessibleObject of the injection target is of type
 Method or Constructor, then the Annotation may be
 specified on the AccessibleObject or on the corresponding
 parameter.annotationClass - - the Class object corresponding to the annotation typeNullPointerException - - if the given annotation class is nullpublic Type getGenericTypeParameter()
Copyright © 2014. All rights reserved.