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 ActionConfigManager |
actionConfigManager |
protected ActionMethodParamNameResolver |
actionMethodParamNameResolver |
protected ActionsManager |
actionsManager |
protected ContextInjectorComponent |
contextInjectorComponent |
protected FiltersManager |
filtersManager |
protected InterceptorsManager |
interceptorsManager |
protected RootPackages |
rootPackages |
protected ScopeDataInspector |
scopeDataInspector |
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,
java.lang.Class<? extends ActionResult> defaultActionResult,
ActionFilter[] filters,
ActionInterceptor[] interceptors,
ActionDefinition actionDefinition,
boolean async,
boolean auth)
Creates new instance of action runtime configuration.
|
protected ActionAnnotationValues |
detectActionAnnotationValues(java.lang.reflect.Method actionMethod)
Detects
ActionAnnotationValues . |
protected void |
detectAndRegisterAlias(ActionAnnotationValues annotationValues,
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(ActionAnnotationValues annotationValues)
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,
ActionAnnotationValues annotationValues,
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(ActionAnnotationValues annotationValues)
Resolves action config.
|
@PetiteInject protected ContextInjectorComponent contextInjectorComponent
@PetiteInject protected ActionConfigManager actionConfigManager
@PetiteInject protected ActionsManager actionsManager
@PetiteInject protected InterceptorsManager interceptorsManager
@PetiteInject protected FiltersManager filtersManager
@PetiteInject protected RootPackages rootPackages
@PetiteInject protected ScopeDataInspector scopeDataInspector
@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(ActionAnnotationValues annotationValues)
protected ActionAnnotationValues detectActionAnnotationValues(java.lang.reflect.Method actionMethod)
ActionAnnotationValues
. Returns null
if annotation does not exist.protected void detectAndRegisterAlias(ActionAnnotationValues annotationValues, 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)
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, ActionAnnotationValues annotationValues, ActionConfig actionConfig)
protected java.lang.String parseMethodAlias(ActionAnnotationValues annotationValues)
public ActionRuntime createActionRuntime(ActionHandler actionHandler, java.lang.Class actionClass, java.lang.reflect.Method actionClassMethod, java.lang.Class<? extends ActionResult> actionResult, java.lang.Class<? extends ActionResult> defaultActionResult, ActionFilter[] filters, ActionInterceptor[] interceptors, ActionDefinition actionDefinition, boolean async, boolean auth)
Copyright © 2003-present Jodd Team