Class InstanceBinder

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

@Api public class InstanceBinder extends Object implements ParameterBinder
ParameterBinder that bind known components to method parameters by class.
Author:
Cezary Kozar 31 maj 2016
  • Constructor Details

    • InstanceBinder

      public InstanceBinder(Object... instances)
  • 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