public class MethodInvoker extends Object
| Modifier and Type | Class and Description |
|---|---|
protected static class |
MethodInvoker.RestParameterType |
| Modifier and Type | Field and Description |
|---|---|
protected Method |
method |
protected ValueInjector[] |
params |
protected List<RequestPreprocessor> |
preprocessors |
protected Class<?> |
rootClass |
| Constructor and Description |
|---|
MethodInvoker(Class<?> root,
Method method,
String httpMethod) |
| Modifier and Type | Method and Description |
|---|---|
protected static ValueInjector |
createParameterExtractor(Class<?> injectTargetClass,
Type type,
Annotation[] annotations) |
protected static ValueInjector |
createParameterExtractorForComplexType(Class<?> injectTargetClass,
Type type,
Annotation[] annotations)
The user can define a value object to group parameters that are passed in the same way (query, form, path, cookie, header).
|
protected static ValueInjector |
createParameterExtractorForSimpleType(Class<?> injectTargetClass,
Type type,
Annotation[] annotations) |
protected static ValueInjector |
createParameterExtractorForSimpleType(MethodInvoker.RestParameterType restParameterType,
Class<?> injectTargetClass,
Type type,
String paramName,
String defaultValue) |
ValueInjector[] |
getParams() |
protected void |
initializePreprocessors() |
Object[] |
injectArguments(HttpRequest input) |
Object |
invoke(HttpRequest request,
Object resource) |
protected void |
preprocess(HttpRequest request) |
protected void |
validateParamExtractors(String httpMethod) |
protected Method method
protected Class<?> rootClass
protected ValueInjector[] params
protected List<RequestPreprocessor> preprocessors
public ValueInjector[] getParams()
public Object[] injectArguments(HttpRequest input)
public Object invoke(HttpRequest request, Object resource) throws RestFailure
RestFailureprotected void initializePreprocessors()
throws RequestProcessorException
RequestProcessorExceptionprotected void preprocess(HttpRequest request) throws RestFailure
RestFailureprotected static ValueInjector createParameterExtractor(Class<?> injectTargetClass, Type type, Annotation[] annotations)
protected static ValueInjector createParameterExtractorForSimpleType(Class<?> injectTargetClass, Type type, Annotation[] annotations)
protected static ValueInjector createParameterExtractorForSimpleType(MethodInvoker.RestParameterType restParameterType, Class<?> injectTargetClass, Type type, String paramName, String defaultValue)
protected static ValueInjector createParameterExtractorForComplexType(Class<?> injectTargetClass, Type type, Annotation[] annotations)
injectTargetClass - injectTarget - type - genericType - annotations - protected void validateParamExtractors(String httpMethod)
Copyright © 2015. All rights reserved.