Package org.junit.jupiter.api.extension
Interface Extension
-
- All Known Subinterfaces:
AfterAllCallback,AfterEachCallback,AfterTestExecutionCallback,BeforeAllCallback,BeforeEachCallback,BeforeTestExecutionCallback,ExecutionCondition,InvocationInterceptor,LifecycleMethodExecutionExceptionHandler,ParameterResolver,TestExecutionExceptionHandler,TestInstanceFactory,TestInstancePostProcessor,TestInstancePreDestroyCallback,TestTemplateInvocationContextProvider,TestWatcher
- All Known Implementing Classes:
TypeBasedParameterResolver
@API(status=STABLE, since="5.0") public interface ExtensionMarker interface for all extensions.An
Extensioncan be registered declaratively via@ExtendWith, programmatically via@RegisterExtension, or automatically via theServiceLoadermechanism. For details on the latter, consult the User Guide.Constructor Requirements
Extension implementations must have a default constructor if registered via
@ExtendWithor theServiceLoader. When registered via@ExtendWiththe default constructor is not required to bepublic. When registered via theServiceLoaderthe default constructor must bepublic. When registered via@RegisterExtensionthe extension's constructors typically must bepublicunless the extension providesstaticfactory methods or a builder API as an alternative to constructors.- Since:
- 5.0