Interface ExtensionRegistrar
-
- All Known Implementing Classes:
MutableExtensionRegistry
@API(status=INTERNAL, since="5.5") public interface ExtensionRegistrar
AnExtensionRegistrar
is used to register extension.- Since:
- 5.5
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
registerExtension(Extension extension, Object source)
Register the suppliedExtension
, without checking if an extension of that type already exists.
-
-
-
Method Detail
-
registerExtension
void registerExtension(Extension extension, Object source)
Register the suppliedExtension
, without checking if an extension of that type already exists.Semantics for Source
If an extension is registered declaratively via
@ExtendWith
, thesource
and theextension
should be the same object. However, if an extension is registered programmatically via@RegisterExtension
, thesource
object should be theField
that is annotated with@RegisterExtension
. Similarly, if an extension is registered programmatically as a lambda expression or method reference, thesource
object should be the underlyingMethod
that implements the extension API.- Parameters:
extension
- the extension to register; nevernull
source
- the source of the extension; nevernull
-
-