Class ParameterUtils

java.lang.Object
io.qameta.allure.util.ParameterUtils

public final class ParameterUtils extends Object
Utility methods for converting Java method arguments into Allure parameters.

Aspect and framework integrations use this class to apply Param metadata, excluded flags, modes, and display names consistently.

  • Method Details

    • createParameters

      public static List<io.qameta.allure.model.Parameter> createParameters(Method method, Object... args)
      Creates and returns the parameters.
      Parameters:
      method - the framework or Java method to inspect
      args - the args
      Returns:
      the parameters
    • createParameter

      public static io.qameta.allure.model.Parameter createParameter(Parameter parameter, Object value)
      Creates and returns the parameter using the Java reflection parameter name as a fallback.
      Parameters:
      parameter - the Java parameter to inspect
      value - the value
      Returns:
      the parameter
    • createParameter

      public static io.qameta.allure.model.Parameter createParameter(AnnotatedElement parameter, Object value, String defaultName)
      Creates and returns the parameter.
      Parameters:
      parameter - the parameter declaration site to inspect — a method or constructor parameter, or a field
      value - the value
      defaultName - the name to use when Param does not override it
      Returns:
      the parameter