U - U is the annotation used to identify the injection targets.public abstract class InjectionResolver<U extends java.lang.annotation.Annotation> extends java.lang.Object implements InjectionResolverQuery
Inject
Injection targets are identified by the generic parameter and the constructor
of this class. Potential injection targets are fields and methods of the
injected type.| Constructor and Description |
|---|
InjectionResolver(java.lang.Class<U> type)
Construct a resolver with a particular injection type
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.reflect.Method |
getSetterMethod(java.lang.reflect.Method annotated,
U annotation)
Returns the setter method responsible for setting the resource identified by the
passed annotation on the passed annotated method.
|
boolean |
isOptional(java.lang.reflect.AnnotatedElement annotated,
U annotation)
Returns true if the resolution of this injection identified by the
passed annotation instance is optional
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetValuepublic final java.lang.Class<U extends java.lang.annotation.Annotation> type
public InjectionResolver(java.lang.Class<U> type)
type - the injection annotation typepublic java.lang.reflect.Method getSetterMethod(java.lang.reflect.Method annotated,
U annotation)
annotated - is the annotated Methodannotation - the annotation on the methodpublic boolean isOptional(java.lang.reflect.AnnotatedElement annotated,
U annotation)
annotated - is the annotated java element Method
or Fieldannotation - the injection metadatagetValue() can return null without generating a
faulty injection operationCopyright © 2013 Oracle Corporation. All Rights Reserved.