Class ParametersBinder
java.lang.Object
com.suncode.pwfl.component.support.ParametersBinder
- All Implemented Interfaces:
ParameterBinder
ParameterBinder
implementation that binds parameters from provided Parameters
class to every method parameter annotated with @Param
annotation.- Author:
- Cezary Kozar 31 maj 2016
-
Constructor Summary
ConstructorsConstructorDescriptionParametersBinder
(Parameters parameters) ParametersBinder
(Parameters parameters, boolean requireParamAnnotation) -
Method Summary
Modifier and TypeMethodDescriptionbind
(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.
-
Constructor Details
-
ParametersBinder
-
ParametersBinder
-
-
Method Details
-
shouldBind
Description copied from interface:ParameterBinder
Must return true if this binder should be used to bind given parameter.- Specified by:
shouldBind
in interfaceParameterBinder
- Parameters:
index
- parameter index (first is 0)type
- parameter typemethod
- invoked method- Returns:
- true if binder is able to bind parameter
-
bind
Description copied from interface:ParameterBinder
Returns object that will be used as argument for invoked method.- Specified by:
bind
in interfaceParameterBinder
- Parameters:
index
- parameter index (first is 0)type
- parameter typemethod
- invoked method- Returns:
- invocation argument
-