public class ResourceInjector extends AbstractAnnotationVisitor
target, targetClass| Constructor and Description |
|---|
ResourceInjector(ResourceManager resMgr) |
ResourceInjector(ResourceManager resMgr,
java.util.List<ResourceResolver> resolvers) |
| Modifier and Type | Method and Description |
|---|---|
void |
construct(java.lang.Object o) |
void |
construct(java.lang.Object o,
java.lang.Class<?> cls) |
void |
destroy(java.lang.Object o) |
protected java.lang.Class<?> |
getResourceType(javax.annotation.Resource res,
java.lang.reflect.Field field)
making this protected to keep pmd happy
|
void |
inject(java.lang.Object o) |
void |
inject(java.lang.Object o,
java.lang.Class<?> claz) |
void |
invokePostConstruct() |
void |
invokePreDestroy() |
static boolean |
processable(java.lang.Class<?> cls,
java.lang.Object o) |
void |
visitClass(java.lang.Class<?> clz,
java.lang.annotation.Annotation annotation)
visit an annotated class.
|
void |
visitField(java.lang.reflect.Field field,
java.lang.annotation.Annotation annotation)
visit an annotated field.
|
void |
visitMethod(java.lang.reflect.Method method,
java.lang.annotation.Annotation annotation)
visit an annotated method.
|
addTargetAnnotation, getTarget, getTargetAnnotations, getTargetClass, setTarget, setTargetpublic ResourceInjector(ResourceManager resMgr)
public ResourceInjector(ResourceManager resMgr, java.util.List<ResourceResolver> resolvers)
public static boolean processable(java.lang.Class<?> cls,
java.lang.Object o)
public void inject(java.lang.Object o)
public void inject(java.lang.Object o,
java.lang.Class<?> claz)
public void construct(java.lang.Object o)
public void construct(java.lang.Object o,
java.lang.Class<?> cls)
public void destroy(java.lang.Object o)
public final void visitClass(java.lang.Class<?> clz,
java.lang.annotation.Annotation annotation)
AnnotationVisitorvisitClass is called for each of the annotations
that matches and for each class.visitClass in interface AnnotationVisitorvisitClass in class AbstractAnnotationVisitorclz - the class with the annotationannotation - the annotationpublic final void visitField(java.lang.reflect.Field field,
java.lang.annotation.Annotation annotation)
AnnotationVisitorvisitField is called for each of the annotations
that matches and for each field.visitField in interface AnnotationVisitorvisitField in class AbstractAnnotationVisitorfield - the annotated fieldannotation - the annotationpublic final void visitMethod(java.lang.reflect.Method method,
java.lang.annotation.Annotation annotation)
AnnotationVisitorvisitMethod is called for each of the annotations
that matches and for each method.visitMethod in interface AnnotationVisitorvisitMethod in class AbstractAnnotationVisitormethod - the annotated fieldxannotation - the annotationpublic void invokePostConstruct()
public void invokePreDestroy()
protected java.lang.Class<?> getResourceType(javax.annotation.Resource res,
java.lang.reflect.Field field)