Interface ClassTemplateInvocationContext
ClassTemplateInvocationContext represents the context of
a single invocation of a @ClassTemplate.
Each context is provided by a
ClassTemplateInvocationContextProvider.
- Since:
- 5.13
- See Also:
- 
Method SummaryModifier and TypeMethodDescriptionGet the additional extensions for this invocation.default StringgetDisplayName(int invocationIndex) Get the display name for this invocation.default voidprepareInvocation(ExtensionContext context) Prepare the imminent invocation of the class template.
- 
Method Details- 
getDisplayNameGet the display name for this invocation.The supplied invocationIndexis incremented by the framework with each container invocation. Thus, in the case of multiple active providers, only the first active provider receives indices starting with1.The default implementation returns the supplied invocationIndexwrapped in brackets — for example,[1],[42], etc.- Parameters:
- invocationIndex- the index of this invocation (1-based).
- Returns:
- the display name for this invocation; never nullor blank
 
- 
getAdditionalExtensionsGet the additional extensions for this invocation.The extensions provided by this method will only be used for this invocation of the class template. Thus, it does not make sense to return an extension that acts solely on the container level (e.g. BeforeAllCallback).The default implementation returns an empty list. - Returns:
- the additional extensions for this invocation; never nullor containingnullelements, but potentially empty
 
- 
prepareInvocationPrepare the imminent invocation of the class template.This may be used, for example, to store entries in the Storeto benefit from its cleanup support or for retrieval by other extensions.- Parameters:
- context- The invocation-level extension context.
 
 
-