Package org.apache.myfaces.spi.impl
Class ResourceAnnotationInjectionProvider
- java.lang.Object
-
- org.apache.myfaces.spi.InjectionProvider
-
- org.apache.myfaces.spi.impl.NoInjectionAnnotationInjectionProvider
-
- org.apache.myfaces.spi.impl.ResourceAnnotationInjectionProvider
-
- Direct Known Subclasses:
AllAnnotationInjectionProvider
public class ResourceAnnotationInjectionProvider extends NoInjectionAnnotationInjectionProvider
-
-
Constructor Summary
Constructors Constructor Description ResourceAnnotationInjectionProvider(Context context)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidcheckFieldAnnotation(Field field, Object instance)protected voidcheckMethodAnnotation(Method method, Object instance)protected static StringgetFieldName(Method setter)Returns the field name for the given Method.protected static voidlookupFieldResource(Context context, Object instance, Field field, String name)Inject resources in specified field.protected static voidlookupMethodResource(Context context, Object instance, Method method, String name)Inject resources in specified method.protected voidprocessAnnotations(Object instance)Inject resources in specified instance.-
Methods inherited from class org.apache.myfaces.spi.impl.NoInjectionAnnotationInjectionProvider
inject, postConstruct, preDestroy
-
Methods inherited from class org.apache.myfaces.spi.InjectionProvider
isAvailable
-
-
-
-
Field Detail
-
context
protected Context context
-
-
Constructor Detail
-
ResourceAnnotationInjectionProvider
public ResourceAnnotationInjectionProvider(Context context)
-
-
Method Detail
-
processAnnotations
protected void processAnnotations(Object instance) throws IllegalAccessException, InvocationTargetException, NamingException
Inject resources in specified instance.- Overrides:
processAnnotationsin classNoInjectionAnnotationInjectionProvider- Throws:
IllegalAccessExceptionInvocationTargetExceptionNamingException
-
checkMethodAnnotation
protected void checkMethodAnnotation(Method method, Object instance) throws NamingException, IllegalAccessException, InvocationTargetException
-
checkFieldAnnotation
protected void checkFieldAnnotation(Field field, Object instance) throws NamingException, IllegalAccessException
-
lookupFieldResource
protected static void lookupFieldResource(Context context, Object instance, Field field, String name) throws NamingException, IllegalAccessException
Inject resources in specified field.
-
lookupMethodResource
protected static void lookupMethodResource(Context context, Object instance, Method method, String name) throws NamingException, IllegalAccessException, InvocationTargetException
Inject resources in specified method.
-
-