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
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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, preDestroyMethods inherited from class org.apache.myfaces.spi.InjectionProvider
isAvailable
-
Field Details
-
context
-
-
Constructor Details
-
ResourceAnnotationInjectionProvider
-
-
Method Details
-
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. -
getFieldName
Returns the field name for the given Method. E.g. setName() will be "name".- Parameters:
setter- the setter method- Returns:
- the field name of the given setter method
-