Class LifecycleMethodUtils
- java.lang.Object
-
- org.junit.jupiter.engine.descriptor.LifecycleMethodUtils
-
final class LifecycleMethodUtils extends java.lang.ObjectCollection of utilities for working with test lifecycle methods.- Since:
- 5.0
-
-
Constructor Summary
Constructors Modifier Constructor Description privateLifecycleMethodUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.lang.StringclassTemplateInvocationLifecycleMethodAnnotationName(java.lang.reflect.Method method)private static DiscoveryIssuecreateIssue(DiscoveryIssue.Severity severity, java.lang.String message, java.lang.reflect.Method method)(package private) static java.util.List<java.lang.reflect.Method>findAfterAllMethods(java.lang.Class<?> testClass, boolean requireStatic, DiscoveryIssueReporter issueReporter)(package private) static java.util.List<java.lang.reflect.Method>findAfterEachMethods(java.lang.Class<?> testClass, DiscoveryIssueReporter issueReporter)private static java.util.stream.Stream<java.lang.reflect.Method>findAllClassTemplateInvocationLifecycleMethods(java.lang.Class<?> testClass)(package private) static java.util.List<java.lang.reflect.Method>findBeforeAllMethods(java.lang.Class<?> testClass, boolean requireStatic, DiscoveryIssueReporter issueReporter)(package private) static java.util.List<java.lang.reflect.Method>findBeforeEachMethods(java.lang.Class<?> testClass, DiscoveryIssueReporter issueReporter)private static java.util.Optional<org.junit.jupiter.api.extension.ClassTemplateInvocationLifecycleMethod>findClassTemplateInvocationLifecycleMethodAnnotation(java.lang.reflect.Method method)private static java.util.List<java.lang.reflect.Method>findMethodsAndCheckNonStatic(java.lang.Class<?> testClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, DiscoveryIssueReporter issueReporter)private static java.util.List<java.lang.reflect.Method>findMethodsAndCheckStatic(java.lang.Class<?> testClass, boolean requireStatic, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, DiscoveryIssueReporter issueReporter)private static java.util.List<java.lang.reflect.Method>findMethodsAndCheckVoidReturnType(java.lang.Class<?> testClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, DiscoveryIssueReporter issueReporter, DiscoveryIssueReporter.Condition<? super java.lang.reflect.Method> additionalCondition)private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method>isNotPrivateError(DiscoveryIssueReporter issueReporter)private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method>isNotPrivateWarning(DiscoveryIssueReporter issueReporter, java.util.function.Supplier<java.lang.String> annotationNameProvider)private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method>isNotStatic(DiscoveryIssueReporter issueReporter, java.util.function.Function<java.lang.reflect.Method,java.lang.String> annotationNameProvider)private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method>isStatic(DiscoveryIssueReporter issueReporter, java.util.function.Function<java.lang.reflect.Method,java.lang.String> annotationNameProvider)private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method>returnsPrimitiveVoid(DiscoveryIssueReporter issueReporter, java.util.function.Function<java.lang.reflect.Method,java.lang.String> annotationNameProvider)(package private) static voidvalidateClassTemplateInvocationLifecycleMethodsAreDeclaredCorrectly(java.lang.Class<?> testClass, boolean requireStatic, DiscoveryIssueReporter issueReporter)(package private) static voidvalidateNoClassTemplateInvocationLifecycleMethodsAreDeclared(java.lang.Class<?> testClass, DiscoveryIssueReporter issueReporter)
-
-
-
Method Detail
-
findBeforeAllMethods
static java.util.List<java.lang.reflect.Method> findBeforeAllMethods(java.lang.Class<?> testClass, boolean requireStatic, DiscoveryIssueReporter issueReporter)
-
findAfterAllMethods
static java.util.List<java.lang.reflect.Method> findAfterAllMethods(java.lang.Class<?> testClass, boolean requireStatic, DiscoveryIssueReporter issueReporter)
-
findBeforeEachMethods
static java.util.List<java.lang.reflect.Method> findBeforeEachMethods(java.lang.Class<?> testClass, DiscoveryIssueReporter issueReporter)
-
findAfterEachMethods
static java.util.List<java.lang.reflect.Method> findAfterEachMethods(java.lang.Class<?> testClass, DiscoveryIssueReporter issueReporter)
-
validateNoClassTemplateInvocationLifecycleMethodsAreDeclared
static void validateNoClassTemplateInvocationLifecycleMethodsAreDeclared(java.lang.Class<?> testClass, DiscoveryIssueReporter issueReporter)
-
validateClassTemplateInvocationLifecycleMethodsAreDeclaredCorrectly
static void validateClassTemplateInvocationLifecycleMethodsAreDeclaredCorrectly(java.lang.Class<?> testClass, boolean requireStatic, DiscoveryIssueReporter issueReporter)
-
findAllClassTemplateInvocationLifecycleMethods
private static java.util.stream.Stream<java.lang.reflect.Method> findAllClassTemplateInvocationLifecycleMethods(java.lang.Class<?> testClass)
-
findMethodsAndCheckStatic
private static java.util.List<java.lang.reflect.Method> findMethodsAndCheckStatic(java.lang.Class<?> testClass, boolean requireStatic, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, DiscoveryIssueReporter issueReporter)
-
findMethodsAndCheckNonStatic
private static java.util.List<java.lang.reflect.Method> findMethodsAndCheckNonStatic(java.lang.Class<?> testClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, DiscoveryIssueReporter issueReporter)
-
findMethodsAndCheckVoidReturnType
private static java.util.List<java.lang.reflect.Method> findMethodsAndCheckVoidReturnType(java.lang.Class<?> testClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotationType, org.junit.platform.commons.support.HierarchyTraversalMode traversalMode, DiscoveryIssueReporter issueReporter, DiscoveryIssueReporter.Condition<? super java.lang.reflect.Method> additionalCondition)
-
isStatic
private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isStatic(DiscoveryIssueReporter issueReporter, java.util.function.Function<java.lang.reflect.Method,java.lang.String> annotationNameProvider)
-
isNotStatic
private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isNotStatic(DiscoveryIssueReporter issueReporter, java.util.function.Function<java.lang.reflect.Method,java.lang.String> annotationNameProvider)
-
isNotPrivateError
private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isNotPrivateError(DiscoveryIssueReporter issueReporter)
-
isNotPrivateWarning
private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method> isNotPrivateWarning(DiscoveryIssueReporter issueReporter, java.util.function.Supplier<java.lang.String> annotationNameProvider)
-
returnsPrimitiveVoid
private static DiscoveryIssueReporter.Condition<java.lang.reflect.Method> returnsPrimitiveVoid(DiscoveryIssueReporter issueReporter, java.util.function.Function<java.lang.reflect.Method,java.lang.String> annotationNameProvider)
-
classTemplateInvocationLifecycleMethodAnnotationName
private static java.lang.String classTemplateInvocationLifecycleMethodAnnotationName(java.lang.reflect.Method method)
-
findClassTemplateInvocationLifecycleMethodAnnotation
private static java.util.Optional<org.junit.jupiter.api.extension.ClassTemplateInvocationLifecycleMethod> findClassTemplateInvocationLifecycleMethodAnnotation(java.lang.reflect.Method method)
-
createIssue
private static DiscoveryIssue createIssue(DiscoveryIssue.Severity severity, java.lang.String message, java.lang.reflect.Method method)
-
-