public class ActionMethodParser
extends java.lang.Object
action configurations from action java method.
Reads all annotations and builds action path (i.e. configuration).
Invoked only during registration, so performance is not critical.
| Modifier and Type | Field and Description |
|---|---|
protected ActionMethodParamNameResolver |
actionMethodParamNameResolver |
protected ActionsManager |
actionsManager |
protected ContextInjectorComponent |
contextInjectorComponent |
protected FiltersManager |
filtersManager |
protected InterceptorsManager |
interceptorsManager |
protected MadvocConfig |
madvocConfig |
protected ScopeDataResolver |
scopeDataResolver |
| Constructor and Description |
|---|
ActionMethodParser() |
| Modifier and Type | Method and Description |
|---|---|
ActionConfig |
createActionConfig(java.lang.Class actionClass,
java.lang.reflect.Method actionClassMethod,
java.lang.Class<? extends ActionResult> actionResult,
ActionFilter[] filters,
ActionInterceptor[] interceptors,
ActionDef actionDef,
boolean async)
Creates new instance of action configuration.
|
protected ActionAnnotationData |
detectActionAnnotationData(java.lang.reflect.Method actionMethod)
Detects
ActionAnnotationData. |
protected void |
detectAndRegisterAlias(ActionAnnotationData annotationData,
ActionDef actionDef)
Detects if alias is defined in annotation and registers it if so.
|
ActionConfig |
parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod,
ActionDef actionDef)
Parses java action method annotation and returns its action configuration.
|
ActionDef |
parseActionDef(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod)
Parses action class and method and creates
parsed action definition. |
protected ActionFilter[] |
parseActionFilters(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod) |
protected ActionInterceptor[] |
parseActionInterceptors(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod) |
protected java.lang.Class<? extends ActionResult> |
parseActionResult(ActionAnnotationData annotationData) |
protected java.lang.String |
parseMethodAlias(ActionAnnotationData annotationData)
Reads method's alias value.
|
protected java.lang.Class<? extends ActionFilter>[] |
readActionFilters(java.lang.reflect.AnnotatedElement actionClassOrMethod)
Reads class or method annotation for action filters.
|
protected java.lang.Class<? extends ActionInterceptor>[] |
readActionInterceptors(java.lang.reflect.AnnotatedElement actionClassOrMethod)
Reads class or method annotation for action interceptors.
|
protected void |
readClassActionPath(ActionNames actionNames,
java.lang.Class actionClass)
Reads action path from class.
|
protected void |
readMethodActionPath(ActionNames actionNames,
java.lang.String methodName,
ActionAnnotationData annotationData)
Reads action method.
|
protected void |
readMethodExtension(ActionNames actionNames,
ActionAnnotationData annotationData)
Reads method's extension.
|
protected void |
readPackageActionPath(ActionNames actionNames,
java.lang.Class actionClass)
Reads action path for package.
|
@PetiteInject protected ContextInjectorComponent contextInjectorComponent
@PetiteInject protected ActionsManager actionsManager
@PetiteInject protected InterceptorsManager interceptorsManager
@PetiteInject protected FiltersManager filtersManager
@PetiteInject protected MadvocConfig madvocConfig
@PetiteInject protected ScopeDataResolver scopeDataResolver
@PetiteInject protected ActionMethodParamNameResolver actionMethodParamNameResolver
public ActionDef parseActionDef(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod)
parsed action definition.public ActionConfig parse(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod, ActionDef actionDef)
actionClass - action classactionMethod - action methodactionDef - optional action def, usually null so to be parsedprotected ActionAnnotationData detectActionAnnotationData(java.lang.reflect.Method actionMethod)
ActionAnnotationData.protected void detectAndRegisterAlias(ActionAnnotationData annotationData, ActionDef actionDef)
protected java.lang.Class<? extends ActionResult> parseActionResult(ActionAnnotationData annotationData)
protected ActionInterceptor[] parseActionInterceptors(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod)
protected ActionFilter[] parseActionFilters(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod)
protected java.lang.Class<? extends ActionInterceptor>[] readActionInterceptors(java.lang.reflect.AnnotatedElement actionClassOrMethod)
protected java.lang.Class<? extends ActionFilter>[] readActionFilters(java.lang.reflect.AnnotatedElement actionClassOrMethod)
protected void readPackageActionPath(ActionNames actionNames, 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 void readClassActionPath(ActionNames actionNames, 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 void readMethodActionPath(ActionNames actionNames, java.lang.String methodName, ActionAnnotationData annotationData)
null if action method is Action.NONE
or if it is equals to default action names.protected void readMethodExtension(ActionNames actionNames, ActionAnnotationData annotationData)
protected java.lang.String parseMethodAlias(ActionAnnotationData annotationData)
public ActionConfig createActionConfig(java.lang.Class actionClass, java.lang.reflect.Method actionClassMethod, java.lang.Class<? extends ActionResult> actionResult, ActionFilter[] filters, ActionInterceptor[] interceptors, ActionDef actionDef, boolean async)
Copyright © 2003-2013 Jodd Team