Enum Class LeakDetection
- All Implemented Interfaces:
Serializable, Comparable<LeakDetection>, Constable
Leak detection level for ClassLoader lifecycle tracking
ClassLoader 生命周期追踪的泄漏检测级别
Defines the level of detail captured when tracking ClassLoader instances for potential memory leaks. Higher levels provide more diagnostic information at the cost of additional overhead.
定义追踪 ClassLoader 实例潜在内存泄漏时捕获的详细程度。 更高级别在额外开销的代价下提供更多诊断信息。
Security | 安全性:
- Thread-safe: Yes (immutable enum) - 线程安全: 是 (不可变枚举)
- Since:
- JDK 25, opencode-base-classloader V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNo leak detection — zero overhead 不检测泄漏 — 零开销Paranoid detection: SIMPLE + records creation stack trace for diagnostics 偏执检测: SIMPLE + 记录创建栈轨迹用于诊断Simple detection using PhantomReference to track unclosed ClassLoaders 简单检测,使用 PhantomReference 追踪未关闭的 ClassLoader -
Method Summary
Modifier and TypeMethodDescriptionstatic LeakDetectionReturns the enum constant of this class with the specified name.static LeakDetection[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DISABLED
No leak detection — zero overhead 不检测泄漏 — 零开销 -
SIMPLE
Simple detection using PhantomReference to track unclosed ClassLoaders 简单检测,使用 PhantomReference 追踪未关闭的 ClassLoader -
PARANOID
Paranoid detection: SIMPLE + records creation stack trace for diagnostics 偏执检测: SIMPLE + 记录创建栈轨迹用于诊断
-
-
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
-