Class LifecycleMethodUtils


  • final class LifecycleMethodUtils
    extends java.lang.Object
    Collection of utilities for working with test lifecycle methods.
    Since:
    1.11
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      private static org.junit.platform.engine.DiscoveryIssue createError​(java.lang.String message, java.lang.reflect.Method method)  
      (package private) static java.util.List<java.lang.reflect.Method> findAfterSuiteMethods​(java.lang.Class<?> testClass, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)  
      (package private) static java.util.List<java.lang.reflect.Method> findBeforeSuiteMethods​(java.lang.Class<?> testClass, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)  
      private static java.util.List<java.lang.reflect.Method> findMethodsAndCheckStaticAndNonPrivate​(java.lang.Class<?> testClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)  
      private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> hasNoParameters​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)  
      private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isNotPrivate​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)  
      private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isStatic​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)  
      private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> returnsPrimitiveVoid​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)  
      • Methods inherited from class java.lang.Object

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

      • LifecycleMethodUtils

        private LifecycleMethodUtils()
    • Method Detail

      • findBeforeSuiteMethods

        static java.util.List<java.lang.reflect.Method> findBeforeSuiteMethods​(java.lang.Class<?> testClass,
                                                                               org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
      • findAfterSuiteMethods

        static java.util.List<java.lang.reflect.Method> findAfterSuiteMethods​(java.lang.Class<?> testClass,
                                                                              org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
      • findMethodsAndCheckStaticAndNonPrivate

        private static java.util.List<java.lang.reflect.Method> findMethodsAndCheckStaticAndNonPrivate​(java.lang.Class<?> testClass,
                                                                                                       java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                                                                                       org.junit.platform.commons.support.HierarchyTraversalMode traversalMode,
                                                                                                       org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
      • isStatic

        private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isStatic​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                                                                                                                       org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
      • isNotPrivate

        private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isNotPrivate​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                                                                                                                           org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
      • returnsPrimitiveVoid

        private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> returnsPrimitiveVoid​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                                                                                                                                   org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
      • hasNoParameters

        private static org.junit.platform.engine.support.discovery.DiscoveryIssueReporter.Condition<java.lang.reflect.Method> hasNoParameters​(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType,
                                                                                                                                              org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
      • createError

        private static org.junit.platform.engine.DiscoveryIssue createError​(java.lang.String message,
                                                                            java.lang.reflect.Method method)