Class CycleDetectedException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
cloud.opencode.base.core.exception.OpenException
cloud.opencode.base.tree.exception.TreeException
cloud.opencode.base.tree.exception.CycleDetectedException
- All Implemented Interfaces:
OpenExceptionMeta, Serializable
Cycle Detected Exception
循环检测异常
Exception thrown when a cycle is detected in tree.
在树中检测到循环时抛出的异常。
Features | 主要功能:
- Cycle detection exception with path - 带路径的循环检测异常
- Immutable cycle path storage - 不可变循环路径存储
Usage Examples | 使用示例:
try {
CycleDetector.checkNoCycle(roots);
} catch (CycleDetectedException e) {
List<?> cyclePath = e.getCyclePath();
}
Security | 安全性:
- Thread-safe: Yes (immutable) - 是(不可变)
- Null-safe: Yes (null path defaults to empty) - 是(null路径默认为空)
- Since:
- JDK 25, opencode-base-tree V1.0.0
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCycleDetectedException(String message) CycleDetectedException(String message, List<?> cyclePath) CycleDetectedException(List<?> cyclePath) -
Method Summary
Methods inherited from class TreeException
buildFailed, duplicateId, getCode, invalidNode, maxDepthExceeded, nodeNotFound, parentNotFoundMethods inherited from class OpenException
getComponent, getErrorCode, getMessage, getRawMessageMethods inherited from class Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toStringMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface OpenExceptionMeta
getMetaPrefix
-
Constructor Details
-
CycleDetectedException
-
CycleDetectedException
-
CycleDetectedException
-
-
Method Details
-
getCyclePath
-