@Api public class ParametersBinder extends Object implements ParameterBinder
ParameterBinder
implementation that binds parameters from provided Parameters
class to every method parameter annotated with @Param
annotation.Constructor and Description |
---|
ParametersBinder(Parameters parameters) |
ParametersBinder(Parameters parameters,
boolean requireParamAnnotation) |
Modifier and Type | Method and Description |
---|---|
Object |
bind(int index,
Class<?> type,
InvocableMethod method)
Returns object that will be used as argument for invoked method.
|
boolean |
shouldBind(int index,
Class<?> type,
InvocableMethod method)
Must return true if this binder should be used to bind given parameter.
|
public ParametersBinder(Parameters parameters)
public ParametersBinder(Parameters parameters, boolean requireParamAnnotation)
public boolean shouldBind(int index, Class<?> type, InvocableMethod method)
ParameterBinder
shouldBind
in interface ParameterBinder
index
- parameter index (first is 0)type
- parameter typemethod
- invoked methodpublic Object bind(int index, Class<?> type, InvocableMethod method)
ParameterBinder
bind
in interface ParameterBinder
index
- parameter index (first is 0)type
- parameter typemethod
- invoked methodCopyright © 2019 Suncode. All rights reserved.