Interface ExtensionRegistrar
-
- All Known Implementing Classes:
MutableExtensionRegistry
@API(status=INTERNAL, since="5.5") public interface ExtensionRegistrarAnExtensionRegistraris used to register extensions.- Since:
- 5.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidregisterExtension(org.junit.jupiter.api.extension.Extension extension, java.lang.Object source)Register the suppliedExtension, without checking if an extension of that type has already been registered.
-
-
-
Method Detail
-
registerExtension
void registerExtension(org.junit.jupiter.api.extension.Extension extension, java.lang.Object source)Register the suppliedExtension, without checking if an extension of that type has already been registered.Semantics for Source
If an extension is registered declaratively via
@ExtendWith, thesourceand theextensionshould be the same object. However, if an extension is registered programmatically via@RegisterExtension, thesourceobject should be theFieldthat is annotated with@RegisterExtension. Similarly, if an extension is registered programmatically as a lambda expression or method reference, thesourceobject should be the underlyingMethodthat implements the extension API.- Parameters:
extension- the extension to register; nevernullsource- the source of the extension; nevernull
-
-