Top Description Fields Constructors Methods
org.junit.platform.console.command

public sealed Enum CustomClassLoaderCloseStrategy

extends Enum<CustomClassLoaderCloseStrategy>
Class Inheritance
Annotations
@API
status:INTERNAL
since:1.13
Static Imports
org.apiguardian.api.API.Status.INTERNAL

Defines the strategy for closing custom class loaders created for test discovery and execution.

Field Summary

Modifier and TypeField and Description
public static final CustomClassLoaderCloseStrategy
CLOSE_AFTER_CALLING_LAUNCHER

Close the custom class loader after calling the org.junit.platform.launcher.Launcher for test discovery or execution.

public static final CustomClassLoaderCloseStrategy
KEEP_OPEN

Rely on the JVM to release resources held by the custom class loader when it terminates.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public abstract void
handle(ClassLoader classLoader)

Handle the class loader according to the strategy.

public static CustomClassLoaderCloseStrategy
public static CustomClassLoaderCloseStrategy[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

CLOSE_AFTER_CALLING_LAUNCHERback to summary
public static final CustomClassLoaderCloseStrategy CLOSE_AFTER_CALLING_LAUNCHER

Close the custom class loader after calling the org.junit.platform.launcher.Launcher for test discovery or execution.

KEEP_OPENback to summary
public static final CustomClassLoaderCloseStrategy KEEP_OPEN

Rely on the JVM to release resources held by the custom class loader when it terminates.

This mode is only safe to use when calling System#exit(int) afterward.

Constructor Detail

CustomClassLoaderCloseStrategyback to summary
private CustomClassLoaderCloseStrategy()

Method Detail

handleback to summary
public abstract void handle(ClassLoader classLoader)

Handle the class loader according to the strategy.

valueOfback to summary
public static CustomClassLoaderCloseStrategy valueOf(String name)
valuesback to summary
public static CustomClassLoaderCloseStrategy[] values()