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. 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.
ParameterizedClass, ParameterizedTest
| Modifier and Type | Field and Description |
|---|---|
| public static final Object | KEY
Hides org.
Deprecated
for removal since 5.14. Please use
The key for retrieving the org. instead
ParameterInfo instance from the
Store.
|
| public static final ExtensionContext. | NAMESPACE
Hides org.
Deprecated
for removal since 5.14. Please use
The org. instead
Namespace for accessing the
Store for ParameterInfo.
|
| Modifier and Type | Method and Description |
|---|---|
| public static @Nullable ParameterInfo | Returns: the closestParameterInfo instance for the supplied
ExtensionContext; potentially nullHides org.
Deprecated
for removal since 5.14. Please use
org.
instead
Returns the closest |
| KEY | back to summary |
|---|---|
| public static final Object KEY Hides org. The key for retrieving the
| |
| NAMESPACE | back to summary |
|---|---|
| public static final ExtensionContext. Hides org. Deprecated for removal since 5.14. Please use
The
| |
| get | back to summary |
|---|---|
| public static @Nullable ParameterInfo get(ExtensionContext context) Hides org. Deprecated for removal since 5.14. Please use
Returns the closest
| |