Interface ParameterInfo

All Superinterfaces:
ParameterInfo

@Deprecated(since="5.14", forRemoval=true) @API(status=DEPRECATED, since="5.14") public interface ParameterInfo extends ParameterInfo
Deprecated, for removal: This API element is subject to removal in a future version.
Please use ParameterInfo instead
ParameterInfo is used to provide information about the current invocation of a parameterized class or test.

Registered Extension implementations may retrieve the current ParameterInfo instance by calling ExtensionContext.getStore(Namespace) with NAMESPACE and Store.get(...) with KEY. Alternatively, the get(ExtensionContext) method may be used to retrieve the ParameterInfo instance for the supplied ExtensionContext. Extensions must not modify any entries in the Store for NAMESPACE.

When a @ParameterizedTest method is declared inside a @ParameterizedClass or a @Nested @ParameterizedClass is declared inside an enclosing @ParameterizedClass, there will be multiple ParameterInfo instances available on different levels of the ExtensionContext hierarchy. In such cases, please use ExtensionContext.getParent() to navigate to the right level before retrieving the ParameterInfo instance from the Store.

Since:
5.13
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Object
    Deprecated, for removal: This API element is subject to removal in a future version.
    Please use ParameterInfo.KEY instead
    static final org.junit.jupiter.api.extension.ExtensionContext.Namespace
    Deprecated, for removal: This API element is subject to removal in a future version.
    Please use ParameterInfo.NAMESPACE instead
  • Method Summary

    Modifier and Type
    Method
    Description
    static @Nullable ParameterInfo
    get(org.junit.jupiter.api.extension.ExtensionContext context)
    Deprecated, for removal: This API element is subject to removal in a future version.

    Methods inherited from interface ParameterInfo

    getArguments, getDeclarations
  • Field Details

    • NAMESPACE

      @Deprecated(since="5.14", forRemoval=true) @API(status=DEPRECATED, since="5.14") static final org.junit.jupiter.api.extension.ExtensionContext.Namespace NAMESPACE
      Deprecated, for removal: This API element is subject to removal in a future version.
      Please use ParameterInfo.NAMESPACE instead
      The ExtensionContext.Namespace for accessing the Store for ParameterInfo.
    • KEY

      @Deprecated(since="5.14", forRemoval=true) @API(status=DEPRECATED, since="5.14") static final Object KEY
      Deprecated, for removal: This API element is subject to removal in a future version.
      Please use ParameterInfo.KEY instead
      The key for retrieving the ParameterInfo instance from the Store.
  • Method Details

    • get

      @Deprecated(since="5.14", forRemoval=true) @API(status=DEPRECATED, since="5.14") static @Nullable ParameterInfo get(org.junit.jupiter.api.extension.ExtensionContext context)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns the closest ParameterInfo instance for the supplied ExtensionContext; potentially null.
      Returns:
      the closest ParameterInfo instance for the supplied ExtensionContext; potentially null