Record Class ClassIndexEntry
java.lang.Object
java.lang.Record
cloud.opencode.base.classloader.index.ClassIndexEntry
public record ClassIndexEntry(String className, String superClassName, List<String> interfaceNames, List<String> annotationNames, int modifiers, boolean isInterface, boolean isAbstract, boolean isEnum, boolean isRecord, boolean isSealed)
extends Record
Class Index Entry - Immutable record representing a single class in the index
类索引条目 - 表示索引中单个类的不可变记录
Stores lightweight metadata for a class without loading it at runtime. Each entry captures the class name, hierarchy, annotations, and type flags.
存储类的轻量级元数据,无需在运行时加载类。 每个条目记录类名、层次结构、注解和类型标志。
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
ConstructorsConstructorDescriptionClassIndexEntry(String className, String superClassName, List<String> interfaceNames, List<String> annotationNames, int modifiers, boolean isInterface, boolean isAbstract, boolean isEnum, boolean isRecord, boolean isSealed) Create a class index entry with defensive copies of lists 创建类索引条目,对列表进行防御性拷贝 -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theannotationNamesrecord component.Returns the value of theclassNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of theinterfaceNamesrecord component.booleanReturns the value of theisAbstractrecord component.booleanisEnum()Returns the value of theisEnumrecord component.booleanReturns the value of theisInterfacerecord component.booleanisRecord()Returns the value of theisRecordrecord component.booleanisSealed()Returns the value of theisSealedrecord component.intReturns the value of themodifiersrecord component.Returns the value of thesuperClassNamerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ClassIndexEntry
public ClassIndexEntry(String className, String superClassName, List<String> interfaceNames, List<String> annotationNames, int modifiers, boolean isInterface, boolean isAbstract, boolean isEnum, boolean isRecord, boolean isSealed) Create a class index entry with defensive copies of lists 创建类索引条目,对列表进行防御性拷贝- Parameters:
className- fully qualified class name | 完全限定类名superClassName- super class name, may be null | 父类名,可为 nullinterfaceNames- list of interface names | 接口名列表annotationNames- list of annotation names | 注解名列表modifiers- access modifiers | 访问修饰符isInterface- whether this is an interface | 是否为接口isAbstract- whether this is abstract | 是否为抽象类isEnum- whether this is an enum | 是否为枚举isRecord- whether this is a record | 是否为 RecordisSealed- whether this is sealed | 是否为密封类
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
className
Returns the value of theclassNamerecord component.- Returns:
- the value of the
classNamerecord component
-
superClassName
Returns the value of thesuperClassNamerecord component.- Returns:
- the value of the
superClassNamerecord component
-
interfaceNames
-
annotationNames
-
modifiers
public int modifiers()Returns the value of themodifiersrecord component.- Returns:
- the value of the
modifiersrecord component
-
isInterface
public boolean isInterface()Returns the value of theisInterfacerecord component.- Returns:
- the value of the
isInterfacerecord component
-
isAbstract
public boolean isAbstract()Returns the value of theisAbstractrecord component.- Returns:
- the value of the
isAbstractrecord component
-
isEnum
public boolean isEnum()Returns the value of theisEnumrecord component.- Returns:
- the value of the
isEnumrecord component
-
isRecord
public boolean isRecord()Returns the value of theisRecordrecord component.- Returns:
- the value of the
isRecordrecord component
-
isSealed
public boolean isSealed()Returns the value of theisSealedrecord component.- Returns:
- the value of the
isSealedrecord component
-