Class ParametersBinder

java.lang.Object
com.suncode.pwfl.component.support.ParametersBinder
All Implemented Interfaces:
ParameterBinder

@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.
Author:
Cezary Kozar 31 maj 2016
  • Constructor Details

    • ParametersBinder

      public ParametersBinder(Parameters parameters)
    • ParametersBinder

      public ParametersBinder(Parameters parameters, boolean requireParamAnnotation)
  • Method Details

    • shouldBind

      public boolean shouldBind(int index, Class<?> type, InvocableMethod method)
      Description copied from interface: ParameterBinder
      Must return true if this binder should be used to bind given parameter.
      Specified by:
      shouldBind in interface ParameterBinder
      Parameters:
      index - parameter index (first is 0)
      type - parameter type
      method - invoked method
      Returns:
      true if binder is able to bind parameter
    • bind

      public Object bind(int index, Class<?> type, InvocableMethod method)
      Description copied from interface: ParameterBinder
      Returns object that will be used as argument for invoked method.
      Specified by:
      bind in interface ParameterBinder
      Parameters:
      index - parameter index (first is 0)
      type - parameter type
      method - invoked method
      Returns:
      invocation argument