Top Description Interfaces Classes Enums
module org.junit.platform.commons

Package org.junit.platform.commons.support

Annotations
@NullMarked
Imports
org.jspecify.annotations.NullMarked

Common support APIs provided by the JUnit Platform.

The purpose of this package is to provide TestEngine and Extension authors convenient access to a subset of internal utility methods to assist with their implementation. This prevents re-inventing the wheel and ensures that common tasks are handled in third-party engines and extensions with the same semantics as within the JUnit Platform itself.

Interface Summary

Modifier and TypeInterface and Description
public interface
Resource

Deprecated for removal since 1.14. Please use org.junit.platform.commons.io.Resource instead.
Resource represents a resource on the classpath.

Class Summary

Modifier and TypeClass and Description
public class
AnnotationSupport

AnnotationSupport provides static utility methods for common tasks regarding annotations — for example, checking if a class, method, or field is annotated with a particular annotation; finding annotations on a given class, method, or field; finding fields or methods annotated with a particular annotation, etc.

TestEngine and extension authors are encouraged to use these supported methods in order to align with the behavior of the JUnit Platform.

public class
ClassSupport

ClassSupport provides static utility methods for common tasks regarding classes — for example, generating a comma-separated list of fully qualified class names for a set of supplied classes.

public class
ModifierSupport

ModifierSupport provides static utility methods for working with class and member modifiers — for example, to determine if a class or member is declared as public, private, abstract, static, etc.

TestEngine and extension authors are encouraged to use these supported methods in order to align with the behavior of the JUnit Platform.

public class
ReflectionSupport

ReflectionSupport provides static utility methods for common reflection tasks — for example, scanning for classes in the class-path or module-path, loading classes, finding methods, invoking methods, etc.

TestEngine and extension authors are encouraged to use these supported methods in order to align with the behavior of the JUnit Platform.

public class
ResourceSupport

ResourceSupport provides static utility methods for common tasks dealing with resources; for example, scanning for resources on the class path or module path.

Enum Summary

Modifier and TypeEnum and Description
public enum
HierarchyTraversalMode

Modes in which a hierarchy can be traversed — for example, when searching for methods or fields within a class hierarchy.

public enum
SearchOption

Deprecated since 1.12. because there is only a single non-deprecated search option left
Search options for finding an annotation within a class hierarchy.