Interface ExecutableInvoker

All Known Implementing Classes:
DefaultExecutableInvoker

@API(status=STABLE, since="5.11") public interface ExecutableInvoker
ExecutableInvoker allows invoking methods and constructors with support for dynamic resolution of parameters via ParameterResolvers.
Since:
5.9
  • Method Summary

    Modifier and Type
    Method
    Description
    default <T> T
    invoke(Constructor<T> constructor)
    Invoke the supplied top-level constructor with dynamic parameter resolution.
    <T> T
    invoke(Constructor<T> constructor, Object outerInstance)
    Invoke the supplied constructor with the supplied outer instance and dynamic parameter resolution.
    default Object
    invoke(Method method)
    Invoke the supplied static method with dynamic parameter resolution.
    invoke(Method method, Object target)
    Invoke the supplied method with dynamic parameter resolution.
  • Method Details

    • invoke

      default Object invoke(Method method)
      Invoke the supplied static method with dynamic parameter resolution.
      Parameters:
      method - the method to invoke and resolve parameters for
      See Also:
    • invoke

      Object invoke(Method method, Object target)
      Invoke the supplied method with dynamic parameter resolution.
      Parameters:
      method - the method to invoke and resolve parameters for
      target - the target on which the executable will be invoked; can be null for static methods
    • invoke

      default <T> T invoke(Constructor<T> constructor)
      Invoke the supplied top-level constructor with dynamic parameter resolution.
      Parameters:
      constructor - the constructor to invoke and resolve parameters for
      See Also:
    • invoke

      <T> T invoke(Constructor<T> constructor, Object outerInstance)
      Invoke the supplied constructor with the supplied outer instance and dynamic parameter resolution.

      Use this method when invoking the constructor for an inner class.

      Parameters:
      constructor - the constructor to invoke and resolve parameters for
      outerInstance - the outer instance to supply as the first argument to the constructor; must be null for top-level classes or static nested classes