Interface ParameterInfo
-
- All Known Subinterfaces:
ParameterInfo
- All Known Implementing Classes:
DefaultParameterInfo
@API(status=EXPERIMENTAL, since="5.14") public interface ParameterInfoParameterInfois used to provide information about the current invocation of a parameterized class or test.Registered
Extensionimplementations may retrieve the currentParameterInfoinstance by callingExtensionContext.getStore(Namespace)withNAMESPACEandStore.get(...)withKEY. Alternatively, theget(ExtensionContext)method may be used to retrieve theParameterInfoinstance for the suppliedExtensionContext. Extensions must not modify any entries in theStoreforNAMESPACE.When a
@ParameterizedTestmethod is declared inside a@ParameterizedClassor a@Nested@ParameterizedClassis declared inside an enclosing@ParameterizedClass, there will be multipleParameterInfoinstances available on different levels of theExtensionContexthierarchy. In such cases, please useExtensionContext.getParent()to navigate to the right level before retrieving theParameterInfoinstance from theStore.- Since:
- 5.14
- See Also:
ParameterizedClass,ParameterizedTest
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.ObjectKEYThe key for retrieving theParameterInfoinstance from theStore.static org.junit.jupiter.api.extension.ExtensionContext.NamespaceNAMESPACETheExtensionContext.Namespacefor accessing theStoreforParameterInfo.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description static ParameterInfoget(org.junit.jupiter.api.extension.ExtensionContext context){@return the closest {@code ParameterInfo} instance for the supplied {@code ExtensionContext}; potentially {@code null}}ArgumentsAccessorgetArguments(){@return the accessor to the arguments of the current invocation}ParameterDeclarationsgetDeclarations(){@return the declarations of all indexed parameters}
-
-
-
Method Detail
-
get
static ParameterInfo get(org.junit.jupiter.api.extension.ExtensionContext context)
{@return the closest {@code ParameterInfo} instance for the supplied {@code ExtensionContext}; potentially {@code null}}
-
getDeclarations
ParameterDeclarations getDeclarations()
{@return the declarations of all indexed parameters}
-
getArguments
ArgumentsAccessor getArguments()
{@return the accessor to the arguments of the current invocation}
-
-