Record Class CyclicDependency
java.lang.Object
java.lang.Record
cloud.opencode.base.classloader.dependency.CyclicDependency
- Record Components:
cyclePath- ordered list of class names forming a cycle (last depends on first) | 形成循环的类名有序列表(最后一个依赖于第一个)
Cyclic Dependency - Represents a dependency cycle among classes
循环依赖 - 表示类之间的依赖循环
Holds an ordered list of class names forming a cycle, where the last element depends on the first.
持有形成循环的类名有序列表,其中最后一个元素依赖于第一个。
Features | 主要功能:
- Immutable record with defensive copy - 不可变记录,使用防御性复制
- Ordered cycle path - 有序的循环路径
Usage Examples | 使用示例:
CyclicDependency cycle = new CyclicDependency(List.of("A", "B", "C"));
// A → B → C → A
Security | 安全性:
- Thread-safe: Yes (immutable record) - 线程安全: 是(不可变记录)
- Since:
- JDK 25, opencode-base-classloader V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionCyclicDependency(List<String> cyclePath) Canonical constructor with null check and defensive copy. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecyclePathrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CyclicDependency
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
cyclePath
-