Package org.apache.cxf.common.injection
Class ResourceInjector
- java.lang.Object
- 
- org.apache.cxf.common.annotation.AbstractAnnotationVisitor
- 
- org.apache.cxf.common.injection.ResourceInjector
 
 
- 
- All Implemented Interfaces:
- AnnotationVisitor
 
 public class ResourceInjector extends AbstractAnnotationVisitor injects references specified using @Resource annotation
- 
- 
Field Summary- 
Fields inherited from class org.apache.cxf.common.annotation.AbstractAnnotationVisitortarget, targetClass
 
- 
 - 
Constructor SummaryConstructors Constructor Description ResourceInjector(ResourceManager resMgr)ResourceInjector(ResourceManager resMgr, List<ResourceResolver> resolvers)
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconstruct(Object o)voidconstruct(Object o, Class<?> cls)voiddestroy(Object o)protected Class<?>getResourceType(javax.annotation.Resource res, Field field)making this protected to keep pmd happyvoidinject(Object o)voidinject(Object o, Class<?> claz)voidinvokePostConstruct()voidinvokePreDestroy()static booleanprocessable(Class<?> cls, Object o)voidvisitClass(Class<?> clz, Annotation annotation)visit an annotated class.voidvisitField(Field field, Annotation annotation)visit an annotated field.voidvisitMethod(Method method, Annotation annotation)visit an annotated method.- 
Methods inherited from class org.apache.cxf.common.annotation.AbstractAnnotationVisitoraddTargetAnnotation, getTarget, getTargetAnnotations, getTargetClass, setTarget, setTarget
 
- 
 
- 
- 
- 
Constructor Detail- 
ResourceInjectorpublic ResourceInjector(ResourceManager resMgr) 
 - 
ResourceInjectorpublic ResourceInjector(ResourceManager resMgr, List<ResourceResolver> resolvers) 
 
- 
 - 
Method Detail- 
injectpublic void inject(Object o) 
 - 
constructpublic void construct(Object o) 
 - 
destroypublic void destroy(Object o) 
 - 
visitClasspublic final void visitClass(Class<?> clz, Annotation annotation) Description copied from interface:AnnotationVisitorvisit an annotated class. Invoked when the class of an object is annotated by one of the specified annotations.visitClassis called for each of the annotations that matches and for each class.- Specified by:
- visitClassin interface- AnnotationVisitor
- Overrides:
- visitClassin class- AbstractAnnotationVisitor
- Parameters:
- clz- the class with the annotation
- annotation- the annotation
 
 - 
visitFieldpublic final void visitField(Field field, Annotation annotation) Description copied from interface:AnnotationVisitorvisit an annotated field. Invoked when the field of an object is annotated by one of the specified annotations.visitFieldis called for each of the annotations that matches and for each field.- Specified by:
- visitFieldin interface- AnnotationVisitor
- Overrides:
- visitFieldin class- AbstractAnnotationVisitor
- Parameters:
- field- the annotated field
- annotation- the annotation
 
 - 
visitMethodpublic final void visitMethod(Method method, Annotation annotation) Description copied from interface:AnnotationVisitorvisit an annotated method. Invoked when the method of an object is annotated by one of the specified annotations.visitMethodis called for each of the annotations that matches and for each method.- Specified by:
- visitMethodin interface- AnnotationVisitor
- Overrides:
- visitMethodin class- AbstractAnnotationVisitor
- Parameters:
- method- the annotated fieldx
- annotation- the annotation
 
 - 
invokePostConstructpublic void invokePostConstruct() 
 - 
invokePreDestroypublic void invokePreDestroy() 
 
- 
 
-