Module org.junit.platform.console
Package org.junit.platform.console.tasks
Enum Class CustomClassLoaderCloseStrategy
java.lang.Object
java.lang.Enum<CustomClassLoaderCloseStrategy>
org.junit.platform.console.tasks.CustomClassLoaderCloseStrategy
- All Implemented Interfaces:
Serializable
,Comparable<CustomClassLoaderCloseStrategy>
,Constable
@API(status=INTERNAL,
since="1.13")
public enum CustomClassLoaderCloseStrategy
extends Enum<CustomClassLoaderCloseStrategy>
Defines the strategy for closing custom class loaders created for test
discovery and execution.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionClose the custom class loader after calling theLauncher
for test discovery or execution.Rely on the JVM to release resources held by the custom class loader when it terminates. -
Method Summary
Modifier and TypeMethodDescriptionabstract void
handle
(ClassLoader classLoader) Handle the class loader according to the strategy.Returns the enum constant of this class with the specified name.static CustomClassLoaderCloseStrategy[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
CLOSE_AFTER_CALLING_LAUNCHER
Close the custom class loader after calling theLauncher
for test discovery or execution. -
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.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
handle
Handle the class loader according to the strategy.
-