jodd.madvoc.config
Class ActionMethodParser

java.lang.Object
  extended by jodd.madvoc.config.ActionMethodParser

public class ActionMethodParser
extends java.lang.Object

Parser of single action method. Creates ActionConfig from the method.


Constructor Summary
ActionMethodParser()
           
 
Method Summary
 ActionConfig parseAction(java.lang.reflect.Method actionMethod)
          Parses action method and returns new ActionConfig or null if method is not an action.
protected  java.lang.String readClassActionPath(java.lang.Class actionClass)
          Reads action path from class.
protected  java.lang.Class<? extends ActionInterceptor>[] readClassInterceptors(java.lang.Class actionClass)
          Reads class interceptors.
protected  java.lang.String readMethodActionPath(java.lang.reflect.Method actionMethod)
          Reads action path from method.
protected  java.lang.Class<? extends ActionInterceptor>[] readMethodInterceptors(java.lang.reflect.Method actionMethod)
          Reads method interceptors.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ActionMethodParser

public ActionMethodParser()
Method Detail

parseAction

public ActionConfig parseAction(java.lang.reflect.Method actionMethod)
Parses action method and returns new ActionConfig or null if method is not an action.


readClassInterceptors

protected java.lang.Class<? extends ActionInterceptor>[] readClassInterceptors(java.lang.Class actionClass)
Reads class interceptors.


readMethodInterceptors

protected java.lang.Class<? extends ActionInterceptor>[] readMethodInterceptors(java.lang.reflect.Method actionMethod)
Reads method interceptors.


readClassActionPath

protected java.lang.String readClassActionPath(java.lang.Class actionClass)
Reads action path from class. If the class is annotated with MadvocAction annotation, class action path will be read from annotation value. Otherwise, action class path will be built from the class name, if not specified by annotation. This is done by removing the package name and the last contained word (if there is more then one) from the class name. Such name is finally uncapitalized.

If this method returns null class will be abandon.


readMethodActionPath

protected java.lang.String readMethodActionPath(java.lang.reflect.Method actionMethod)
Reads action path from method. If annotation Action exists its value is used instead of method name. Special annotation value may indicates that method is not an action; in that case it returns null.



Copyright ©2008 Jodd Team