|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.akquinet.jbosscc.needle.injection.InjectionTargetInformation
public class InjectionTargetInformation
Provides information about the injection target.
| Constructor Summary | |
|---|---|
InjectionTargetInformation(Class<?> type,
Constructor<?> constructor,
Annotation[] parameterAnnotations)
Creates an instance of InjectionTargetInformation for Constructor injection. |
|
InjectionTargetInformation(Class<?> type,
Field field)
Creates an instance of InjectionTargetInformation for Field injection. |
|
InjectionTargetInformation(Class<?> type,
Method method,
Annotation[] parameterAnnotations)
Creates an instance of InjectionTargetInformation for Method injection. |
|
| Method Summary | ||
|---|---|---|
AccessibleObject |
getAccessibleObject()
Returns the AccessibleObject of the injection target. |
|
|
getAnnotation(Class<? extends Annotation> annotationClass)
Returns the Annotation object 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. |
|
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. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InjectionTargetInformation(Class<?> type,
Field field)
InjectionTargetInformation for Field injection.
type - class object of the injection targetfield - Field object of the injection target
public InjectionTargetInformation(Class<?> type,
Method method,
Annotation[] parameterAnnotations)
InjectionTargetInformation for Method injection.
type - class object of the method parametermethod - Method object of the injection targetparameterAnnotations - annotations of method parameter
public InjectionTargetInformation(Class<?> type,
Constructor<?> constructor,
Annotation[] parameterAnnotations)
InjectionTargetInformation for Constructor injection.
type - class object of the constructor parameterconstructor - Constructor object of the injection targetparameterAnnotations - annotations of constructor parameter| Method Detail |
|---|
public 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 type
NullPointerException - - 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 type
NullPointerException - - if the given annotation class is null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||