jodd.madvoc.interceptor
Class AnnotatedFieldsInterceptor

java.lang.Object
  extended by jodd.madvoc.interceptor.ActionInterceptor
      extended by jodd.madvoc.interceptor.AnnotatedFieldsInterceptor

public abstract class AnnotatedFieldsInterceptor
extends ActionInterceptor

Performs some operation on all annotated fields. Helpful with injection of application context into action objects.


Field Summary
protected  java.util.Map<java.lang.Class<?>,java.lang.reflect.Field[]> annotatedField
           
protected static java.lang.reflect.Field[] EMPTY_FIELD
           
protected  java.lang.Class<java.lang.annotation.Annotation> fieldAnnotation
           
 
Fields inherited from class jodd.madvoc.interceptor.ActionInterceptor
initialized
 
Constructor Summary
protected AnnotatedFieldsInterceptor(java.lang.Class<java.lang.annotation.Annotation> fieldAnnotation)
           
 
Method Summary
 java.lang.Object intercept(ActionRequest actionRequest)
          Intercepts action requests.
protected  java.lang.reflect.Field[] lookupAnnotatedFields(java.lang.Class type)
          Lookups for annotated fields.
protected abstract  void onAnnotatedField(ActionRequest actionRequest, java.lang.reflect.Field field)
          Invoked on all annotated fields.
 
Methods inherited from class jodd.madvoc.interceptor.ActionInterceptor
init, initialized, isInitialized, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

fieldAnnotation

protected final java.lang.Class<java.lang.annotation.Annotation> fieldAnnotation

annotatedField

protected java.util.Map<java.lang.Class<?>,java.lang.reflect.Field[]> annotatedField

EMPTY_FIELD

protected static final java.lang.reflect.Field[] EMPTY_FIELD
Constructor Detail

AnnotatedFieldsInterceptor

protected AnnotatedFieldsInterceptor(java.lang.Class<java.lang.annotation.Annotation> fieldAnnotation)
Method Detail

intercept

public java.lang.Object intercept(ActionRequest actionRequest)
                           throws java.lang.Exception
Description copied from class: ActionInterceptor
Intercepts action requests.

Specified by:
intercept in class ActionInterceptor
Throws:
java.lang.Exception

onAnnotatedField

protected abstract void onAnnotatedField(ActionRequest actionRequest,
                                         java.lang.reflect.Field field)
Invoked on all annotated fields.


lookupAnnotatedFields

protected java.lang.reflect.Field[] lookupAnnotatedFields(java.lang.Class type)
Lookups for annotated fields. Caches all annotated fields on the first action class scan.



Copyright © 2003-2011 Jodd Team