|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjodd.madvoc.component.ActionMethodParser
public class ActionMethodParser
Creates action configurations from action java method.
Reads all annotations and builds action path (i.e. configuration).
Invoked only during registration, therefore performance is not most important.
ActionPathMapper| Field Summary | |
|---|---|
protected MadvocConfig |
madvocConfig
|
protected static java.lang.String |
REPL_CLASS
|
protected static java.lang.String |
REPL_EXTENSION
|
protected static java.lang.String |
REPL_METHOD
|
protected static java.lang.String |
REPL_PACKAGE
|
| Constructor Summary | |
|---|---|
ActionMethodParser()
|
|
| Method Summary | |
|---|---|
protected java.lang.String |
buildActionPath(java.lang.String packageActionPath,
java.lang.String classActionPath,
java.lang.String methodActionPath,
java.lang.String extension,
java.lang.String httpMethod)
Builds action path. |
protected ActionConfig |
createActionConfig(java.lang.Class actionClass,
java.lang.reflect.Method actionClassMethod,
java.lang.Class<? extends ActionInterceptor>[] interceptorClasses,
java.lang.String actionPath,
java.lang.String actionMethod,
java.lang.String actionPathExtension)
Creates new instance of action configuration. |
ActionConfig |
parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod)
|
ActionConfig |
parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod,
java.lang.String actionPath)
Parses java action method annotations and returns its action configuration. |
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 when method interceptors are not available. |
protected java.lang.String |
readMethodActionPath(java.lang.String methodName,
ActionAnnotationData annotationData)
Reads action method. |
protected java.lang.String |
readMethodAlias(ActionAnnotationData annotationData)
Reads method's alias value. |
protected java.lang.String |
readMethodExtension(ActionAnnotationData annotationData)
Reads method's extension. |
protected java.lang.Class<? extends ActionInterceptor>[] |
readMethodInterceptors(java.lang.reflect.Method actionMethod)
Reads method interceptors. |
protected java.lang.String |
readPackageActionPath(java.lang.Class actionClass)
Reads action path for package. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.String REPL_PACKAGE
protected static final java.lang.String REPL_CLASS
protected static final java.lang.String REPL_METHOD
protected static final java.lang.String REPL_EXTENSION
@PetiteInject protected MadvocConfig madvocConfig
| Constructor Detail |
|---|
public ActionMethodParser()
| Method Detail |
|---|
public ActionConfig parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod)
public ActionConfig parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod,
java.lang.String actionPath)
null if method is not a madvoc action.
protected java.lang.String buildActionPath(java.lang.String packageActionPath,
java.lang.String classActionPath,
java.lang.String methodActionPath,
java.lang.String extension,
java.lang.String httpMethod)
null.
packageActionPath - action path from package (optional)classActionPath - action path from classmethodActionPath - action path from method (optional)extension - extension (optional)httpMethod - HTTP method name (not used by default)protected java.lang.Class<? extends ActionInterceptor>[] readClassInterceptors(java.lang.Class actionClass)
protected java.lang.Class<? extends ActionInterceptor>[] readMethodInterceptors(java.lang.reflect.Method actionMethod)
protected java.lang.String readPackageActionPath(java.lang.Class actionClass)
madvoc configuration.
If annotation is not set on package-level, class package will be used for
package action path part.
protected java.lang.String readClassActionPath(java.lang.Class actionClass)
MadvocAction annotation,
class action path will be read from annotation value. Otherwise, action class path will be built from the
class name. 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 ignored.
protected java.lang.String readMethodActionPath(java.lang.String methodName,
ActionAnnotationData annotationData)
protected java.lang.String readMethodExtension(ActionAnnotationData annotationData)
protected java.lang.String readMethodAlias(ActionAnnotationData annotationData)
protected ActionConfig createActionConfig(java.lang.Class actionClass,
java.lang.reflect.Method actionClassMethod,
java.lang.Class<? extends ActionInterceptor>[] interceptorClasses,
java.lang.String actionPath,
java.lang.String actionMethod,
java.lang.String actionPathExtension)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||