Class BMUnit5AbstractHandler<A extends java.lang.annotation.Annotation>

  • Type Parameters:
    A - The BMUnit annotation class.
    All Implemented Interfaces:
    org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.AfterEachCallback, org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.Extension
    Direct Known Subclasses:
    BMUnit5ConfigHandler, BMUnit5MultiRuleHandler, BMUnit5MultiScriptHandler, BMUnit5SingleRuleHandler, BMUnit5SingleScriptHandler

    public abstract class BMUnit5AbstractHandler<A extends java.lang.annotation.Annotation>
    extends java.lang.Object
    implements org.junit.jupiter.api.extension.BeforeAllCallback, org.junit.jupiter.api.extension.AfterAllCallback, org.junit.jupiter.api.extension.BeforeEachCallback, org.junit.jupiter.api.extension.AfterEachCallback
    Base class for wiring Byteman BMUnit annotations to the test engine's lifecycle hooks.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.Class<A> annotationClass  
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected BMUnit5AbstractHandler​(java.lang.Class<A> annotationClass)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)  
      void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)  
      java.lang.Class<A> getAnnotationClass()  
      protected abstract void install​(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod, A annotation)  
      protected abstract void uninstall​(java.lang.Class<?> testClass, java.lang.reflect.Method testMethod, A annotation)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • annotationClass

        protected final java.lang.Class<A extends java.lang.annotation.Annotation> annotationClass
    • Constructor Detail

      • BMUnit5AbstractHandler

        protected BMUnit5AbstractHandler​(java.lang.Class<A> annotationClass)
    • Method Detail

      • getAnnotationClass

        public java.lang.Class<A> getAnnotationClass()
      • beforeAll

        public void beforeAll​(org.junit.jupiter.api.extension.ExtensionContext context)
                       throws java.lang.Exception
        Specified by:
        beforeAll in interface org.junit.jupiter.api.extension.BeforeAllCallback
        Throws:
        java.lang.Exception
      • beforeEach

        public void beforeEach​(org.junit.jupiter.api.extension.ExtensionContext context)
                        throws java.lang.Exception
        Specified by:
        beforeEach in interface org.junit.jupiter.api.extension.BeforeEachCallback
        Throws:
        java.lang.Exception
      • install

        protected abstract void install​(java.lang.Class<?> testClass,
                                        java.lang.reflect.Method testMethod,
                                        A annotation)
                                 throws java.lang.Exception
        Throws:
        java.lang.Exception
      • afterAll

        public void afterAll​(org.junit.jupiter.api.extension.ExtensionContext context)
                      throws java.lang.Exception
        Specified by:
        afterAll in interface org.junit.jupiter.api.extension.AfterAllCallback
        Throws:
        java.lang.Exception
      • afterEach

        public void afterEach​(org.junit.jupiter.api.extension.ExtensionContext context)
                       throws java.lang.Exception
        Specified by:
        afterEach in interface org.junit.jupiter.api.extension.AfterEachCallback
        Throws:
        java.lang.Exception
      • uninstall

        protected abstract void uninstall​(java.lang.Class<?> testClass,
                                          java.lang.reflect.Method testMethod,
                                          A annotation)
                                   throws java.lang.Exception
        Throws:
        java.lang.Exception