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

    Constructors
    Constructor
    Description
    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 创建类索引条目,对列表进行防御性拷贝
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the value of the annotationNames record component.
    Returns the value of the className record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    Returns the value of the interfaceNames record component.
    boolean
    Returns the value of the isAbstract record component.
    boolean
    Returns the value of the isEnum record component.
    boolean
    Returns the value of the isInterface record component.
    boolean
    Returns the value of the isRecord record component.
    boolean
    Returns the value of the isSealed record component.
    int
    Returns the value of the modifiers record component.
    Returns the value of the superClassName record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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 | 父类名,可为 null
      interfaceNames - 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 | 是否为 Record
      isSealed - whether this is sealed | 是否为密封类
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • className

      public String className()
      Returns the value of the className record component.
      Returns:
      the value of the className record component
    • superClassName

      public String superClassName()
      Returns the value of the superClassName record component.
      Returns:
      the value of the superClassName record component
    • interfaceNames

      public List<String> interfaceNames()
      Returns the value of the interfaceNames record component.
      Returns:
      the value of the interfaceNames record component
    • annotationNames

      public List<String> annotationNames()
      Returns the value of the annotationNames record component.
      Returns:
      the value of the annotationNames record component
    • modifiers

      public int modifiers()
      Returns the value of the modifiers record component.
      Returns:
      the value of the modifiers record component
    • isInterface

      public boolean isInterface()
      Returns the value of the isInterface record component.
      Returns:
      the value of the isInterface record component
    • isAbstract

      public boolean isAbstract()
      Returns the value of the isAbstract record component.
      Returns:
      the value of the isAbstract record component
    • isEnum

      public boolean isEnum()
      Returns the value of the isEnum record component.
      Returns:
      the value of the isEnum record component
    • isRecord

      public boolean isRecord()
      Returns the value of the isRecord record component.
      Returns:
      the value of the isRecord record component
    • isSealed

      public boolean isSealed()
      Returns the value of the isSealed record component.
      Returns:
      the value of the isSealed record component