Class ParameterResolutionUtils

java.lang.Object
org.junit.jupiter.engine.execution.ParameterResolutionUtils

@API(status=INTERNAL, since="5.9") public class ParameterResolutionUtils extends Object
ParameterResolutionUtils provides support for dynamic resolution of executable parameters via ParameterResolvers.
Since:
5.9
  • Constructor Details

    • ParameterResolutionUtils

      public ParameterResolutionUtils()
  • Method Details

    • resolveParameters

      public static Object[] resolveParameters(Method method, Optional<Object> target, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry)
      Resolve the array of parameters for the supplied method and target.
      Parameters:
      method - the method for which to resolve parameters
      target - an Optional containing the target on which the executable will be invoked; never null but should be empty for static methods and constructors
      extensionContext - the current ExtensionContext
      extensionRegistry - the ExtensionRegistry to retrieve ParameterResolvers from
      Returns:
      the array of Objects to be used as parameters in the executable invocation; never null though potentially empty
    • resolveParameters

      public static Object[] resolveParameters(Executable executable, Optional<Object> target, Optional<Object> outerInstance, ExtensionContext extensionContext, ExtensionRegistry extensionRegistry)
      Resolve the array of parameters for the supplied executable, target, and outer instance.
      Parameters:
      executable - the executable for which to resolve parameters
      target - an Optional containing the target on which the executable will be invoked; never null but should be empty for static methods and constructors
      outerInstance - the outer instance that will be supplied as the first argument to a constructor for an inner class; should be null for methods and constructors for top-level or static classes
      extensionContext - the current ExtensionContext
      extensionRegistry - the ExtensionRegistry to retrieve ParameterResolvers from
      Returns:
      the array of Objects to be used as parameters in the executable invocation; never null though potentially empty
    • resolveParameters

      public static Object[] resolveParameters(Executable executable, Optional<Object> target, Optional<Object> outerInstance, ExtensionContextSupplier extensionContext, ExtensionRegistry extensionRegistry)