public class ActionMethodParser
extends java.lang.Object
action runtime configuration 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 |
|---|---|
ActionRuntime |
createActionRuntime(ActionHandler actionHandler,
java.lang.Class actionClass,
java.lang.reflect.Method actionClassMethod,
java.lang.Class<? extends ActionResult> actionResult,
ActionFilter[] filters,
ActionInterceptor[] interceptors,
ActionDefinition actionDefinition,
boolean async,
ActionConfig actionConfig)
Creates new instance of action runtime configuration.
|
protected ActionAnnotationData |
detectActionAnnotationData(java.lang.reflect.Method actionMethod)
Detects
ActionAnnotationData. |
protected void |
detectAndRegisterAlias(ActionAnnotationData annotationData,
ActionDefinition actionDefinition)
Detects if alias is defined in annotation and registers it if so.
|
ActionRuntime |
parse(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod,
ActionDefinition actionDefinition)
Parses java action method annotation and returns its action runtime.
|
ActionDefinition |
parseActionDefinition(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,
ActionConfig actionConfig) |
protected ActionInterceptor[] |
parseActionInterceptors(java.lang.Class<?> actionClass,
java.lang.reflect.Method actionMethod,
ActionConfig actionConfig) |
protected java.lang.Class<? extends ActionResult> |
parseActionResult(java.lang.reflect.Method actionMethod) |
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 java.lang.String[] |
readClassActionPath(java.lang.Class actionClass)
Reads action path from class.
|
protected java.lang.String[] |
readMethodActionPath(java.lang.String methodName,
ActionAnnotationData annotationData,
ActionConfig actionConfig)
Reads action path from the action method.
|
protected java.lang.String[] |
readPackageActionPath(java.lang.Class actionClass)
Reads action path for package.
|
protected ActionConfig |
resolveActionConfig(ActionAnnotationData annotationData)
Resolves action config.
|
@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 ActionDefinition parseActionDefinition(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod)
parsed action definition.public ActionRuntime parse(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod, ActionDefinition actionDefinition)
actionClass - action classactionMethod - action methodactionDefinition - optional action def, usually null so to be parsedprotected ActionConfig resolveActionConfig(ActionAnnotationData annotationData)
protected ActionAnnotationData detectActionAnnotationData(java.lang.reflect.Method actionMethod)
ActionAnnotationData.protected void detectAndRegisterAlias(ActionAnnotationData annotationData, ActionDefinition actionDefinition)
protected java.lang.Class<? extends ActionResult> parseActionResult(java.lang.reflect.Method actionMethod)
protected ActionInterceptor[] parseActionInterceptors(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod, ActionConfig actionConfig)
protected ActionFilter[] parseActionFilters(java.lang.Class<?> actionClass, java.lang.reflect.Method actionMethod, ActionConfig actionConfig)
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 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.protected java.lang.String[] readMethodActionPath(java.lang.String methodName,
ActionAnnotationData annotationData,
ActionConfig actionConfig)
protected java.lang.String parseMethodAlias(ActionAnnotationData annotationData)
public ActionRuntime createActionRuntime(ActionHandler actionHandler, java.lang.Class actionClass, java.lang.reflect.Method actionClassMethod, java.lang.Class<? extends ActionResult> actionResult, ActionFilter[] filters, ActionInterceptor[] interceptors, ActionDefinition actionDefinition, boolean async, ActionConfig actionConfig)
Copyright © 2003-present Jodd Team