Class ExecutableInvoker

    • Constructor Detail

      • ExecutableInvoker

        public ExecutableInvoker()
    • Method Detail

      • invoke

        public <T> T invoke​(Constructor<T> constructor,
                            ExtensionContext extensionContext,
                            ExtensionRegistry extensionRegistry)
        Invoke the supplied constructor with dynamic parameter resolution.
        Parameters:
        constructor - the constructor to invoke and resolve parameters for
        extensionContext - the current ExtensionContext
        extensionRegistry - the ExtensionRegistry to retrieve ParameterResolvers from
      • invoke

        public <T> T invoke​(Constructor<T> constructor,
                            Object outerInstance,
                            ExtensionContext extensionContext,
                            ExtensionRegistry extensionRegistry)
        Invoke the supplied constructor with the supplied outer instance and dynamic parameter resolution.

        This method should only be used to invoke 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
        extensionContext - the current ExtensionContext
        extensionRegistry - the ExtensionRegistry to retrieve ParameterResolvers from
      • invoke

        public Object invoke​(Method method,
                             ExtensionContext extensionContext,
                             ExtensionRegistry extensionRegistry)
        Invoke the supplied static method with dynamic parameter resolution.
        Parameters:
        method - the method to invoke and resolve parameters for
        extensionContext - the current ExtensionContext
        extensionRegistry - the ExtensionRegistry to retrieve ParameterResolvers from
      • invoke

        public Object invoke​(Method method,
                             Object target,
                             ExtensionContext extensionContext,
                             ExtensionRegistry extensionRegistry)
        Invoke the supplied method on the supplied target object with dynamic parameter resolution.
        Parameters:
        method - the method to invoke and resolve parameters for
        target - the object on which the method will be invoked; should be null for static methods
        extensionContext - the current ExtensionContext
        extensionRegistry - the ExtensionRegistry to retrieve ParameterResolvers from