Package org.apache.struts.dispatcher
Class AbstractMethodResolver
java.lang.Object
org.apache.struts.dispatcher.AbstractMethodResolver
- All Implemented Interfaces:
Serializable
,MethodResolver
- Direct Known Subclasses:
ServletMethodResolver
This abstract class is the stock template for resolving methods for a
Dispatcher
. The implementation handles methods that accept no
arguments or only an ActionContext
instance:
return_type execute()
return_type execute(ActionContext context)
- Since:
- Struts 1.4
- Version:
- $Rev$
- See Also:
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionObject[]
buildArguments
(ActionContext context, Method method) Constructs the arguments that will be passed to the dispatched method.resolveMethod
(ActionContext context, String methodName) Decides the appropriate method instance for the specified method name.
-
Field Details
-
EMPTY_ARGUMENTS
The argument listing for a method without arguments.- See Also:
-
EMPTY_ARGUMENT_TYPES
The type listing used for a method without arguments.- See Also:
-
-
Constructor Details
-
AbstractMethodResolver
public AbstractMethodResolver()
-
-
Method Details
-
buildArguments
Description copied from interface:MethodResolver
Constructs the arguments that will be passed to the dispatched method.- Specified by:
buildArguments
in interfaceMethodResolver
- Parameters:
context
- the current action contextmethod
- the target method of this dispatch- Returns:
- the arguments array for the method, or
null
if the method does not match any supported signatures - See Also:
-
resolveMethod
Description copied from interface:MethodResolver
Decides the appropriate method instance for the specified method name. Implementations may introspect for any desired method signature.- Specified by:
resolveMethod
in interfaceMethodResolver
- Parameters:
context
- the current action contextmethodName
- the method name to use for introspection- Returns:
- the method to invoke
- Throws:
NoSuchMethodException
- if an appropriate method cannot be found
-