Interface MethodCaller


public interface MethodCaller
A high-level wrapper, responsible for invoking methods reflectively.
  • Method Details

    • call

      Object call(@Nullable @Nullable Object instance, Object... arguments)
      Calls the method of this caller
      Parameters:
      instance - Instance to call from. Can be null
      arguments - Invoking arguments
      Returns:
      The return result
    • bindTo

      default MethodCaller.BoundMethodCaller bindTo(@Nullable @Nullable Object instance)
      Binds this caller to the specified instance. Calls from the bound method caller will no longer need an instance to call from.
      Parameters:
      instance - Instance to invoke from. Can be null in case of static methods.
      Returns:
      The bound method caller