Interface MethodInvocationInterceptor

All Superinterfaces:
org.junit.jupiter.api.extension.Extension, org.junit.jupiter.api.extension.InvocationInterceptor
All Known Implementing Classes:
ModLauncherExtension

public interface MethodInvocationInterceptor extends org.junit.jupiter.api.extension.InvocationInterceptor
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor

    org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T extends Object>
  • Method Summary

    Modifier and Type
    Method
    Description
    default void
    interceptAfterAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    default void
    interceptAfterEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    default void
    interceptBeforeAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    default void
    interceptBeforeEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    <T> T
    interceptMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
    Intercepts the invocation of any method.
    default <T> T
    interceptTestFactoryMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    default void
    interceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     
    default void
    interceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
     

    Methods inherited from interface org.junit.jupiter.api.extension.InvocationInterceptor

    interceptDynamicTest, interceptDynamicTest, interceptTestClassConstructor
  • Method Details

    • interceptMethod

      <T> T interceptMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Intercepts the invocation of any method.
      Parameters:
      invocation - The invocation that is being intercepted; never null
      invocationContext - The context of the invocation that is being intercepted; never null
      extensionContext - The current extension context; never null
      Throws:
      Throwable - In case of failures
    • interceptBeforeAllMethod

      default void interceptBeforeAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Specified by:
      interceptBeforeAllMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      Throwable
    • interceptBeforeEachMethod

      default void interceptBeforeEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Specified by:
      interceptBeforeEachMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      Throwable
    • interceptTestMethod

      default void interceptTestMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Specified by:
      interceptTestMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      Throwable
    • interceptTestFactoryMethod

      default <T> T interceptTestFactoryMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<T> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Specified by:
      interceptTestFactoryMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      Throwable
    • interceptTestTemplateMethod

      default void interceptTestTemplateMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Specified by:
      interceptTestTemplateMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      Throwable
    • interceptAfterEachMethod

      default void interceptAfterEachMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Specified by:
      interceptAfterEachMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      Throwable
    • interceptAfterAllMethod

      default void interceptAfterAllMethod(org.junit.jupiter.api.extension.InvocationInterceptor.Invocation<Void> invocation, org.junit.jupiter.api.extension.ReflectiveInvocationContext<Method> invocationContext, org.junit.jupiter.api.extension.ExtensionContext extensionContext) throws Throwable
      Specified by:
      interceptAfterAllMethod in interface org.junit.jupiter.api.extension.InvocationInterceptor
      Throws:
      Throwable