org.apache.myfaces.config.annotation
Class ResourceAnnotationLifecycleProvider
java.lang.Object
org.apache.myfaces.config.annotation.NoInjectionAnnotationLifecycleProvider
org.apache.myfaces.config.annotation.ResourceAnnotationLifecycleProvider
- All Implemented Interfaces:
- LifecycleProvider, LifecycleProvider2
- Direct Known Subclasses:
- AllAnnotationLifecycleProvider
public class ResourceAnnotationLifecycleProvider
- extends NoInjectionAnnotationLifecycleProvider
Field Summary |
protected javax.naming.Context |
context
|
Method Summary |
protected void |
checkFieldAnnotation(java.lang.reflect.Field field,
java.lang.Object instance)
|
protected void |
checkMethodAnnotation(java.lang.reflect.Method method,
java.lang.Object instance)
|
protected static java.lang.String |
getFieldName(java.lang.reflect.Method setter)
Returns the field name for the given Method. |
protected static void |
lookupFieldResource(javax.naming.Context context,
java.lang.Object instance,
java.lang.reflect.Field field,
java.lang.String name)
Inject resources in specified field. |
protected static void |
lookupMethodResource(javax.naming.Context context,
java.lang.Object instance,
java.lang.reflect.Method method,
java.lang.String name)
Inject resources in specified method. |
protected void |
processAnnotations(java.lang.Object instance)
Inject resources in specified instance. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
context
protected javax.naming.Context context
ResourceAnnotationLifecycleProvider
public ResourceAnnotationLifecycleProvider(javax.naming.Context context)
processAnnotations
protected void processAnnotations(java.lang.Object instance)
throws java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
javax.naming.NamingException
- Inject resources in specified instance.
- Overrides:
processAnnotations
in class NoInjectionAnnotationLifecycleProvider
- Throws:
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
javax.naming.NamingException
checkMethodAnnotation
protected void checkMethodAnnotation(java.lang.reflect.Method method,
java.lang.Object instance)
throws javax.naming.NamingException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Throws:
javax.naming.NamingException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
checkFieldAnnotation
protected void checkFieldAnnotation(java.lang.reflect.Field field,
java.lang.Object instance)
throws javax.naming.NamingException,
java.lang.IllegalAccessException
- Throws:
javax.naming.NamingException
java.lang.IllegalAccessException
lookupFieldResource
protected static void lookupFieldResource(javax.naming.Context context,
java.lang.Object instance,
java.lang.reflect.Field field,
java.lang.String name)
throws javax.naming.NamingException,
java.lang.IllegalAccessException
- Inject resources in specified field.
- Throws:
javax.naming.NamingException
java.lang.IllegalAccessException
lookupMethodResource
protected static void lookupMethodResource(javax.naming.Context context,
java.lang.Object instance,
java.lang.reflect.Method method,
java.lang.String name)
throws javax.naming.NamingException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException
- Inject resources in specified method.
- Throws:
javax.naming.NamingException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
getFieldName
protected static java.lang.String getFieldName(java.lang.reflect.Method setter)
- 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
Copyright © 2012 The Apache Software Foundation. All Rights Reserved.