Record Class ReflectConfig

java.lang.Object
java.lang.Record
cloud.opencode.base.classloader.graalvm.ReflectConfig
Record Components:
name - fully qualified class name | 完全限定类名
allDeclaredConstructors - include all declared constructors | 包含所有已声明的构造器
allDeclaredMethods - include all declared methods | 包含所有已声明的方法
allDeclaredFields - include all declared fields | 包含所有已声明的字段
allPublicMethods - include all public methods | 包含所有公共方法

public record ReflectConfig(String name, boolean allDeclaredConstructors, boolean allDeclaredMethods, boolean allDeclaredFields, boolean allPublicMethods) extends Record
GraalVM reflect-config.json entry GraalVM reflect-config.json 配置条目

Immutable record representing a single entry in the GraalVM native image reflection configuration file.

不可变记录,表示 GraalVM Native Image 反射配置文件中的单条记录。

Security | 安全性:

  • Thread-safe: Yes (immutable record) - 线程安全: 是(不可变记录)
Since:
JDK 25, opencode-base-classloader V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Constructor Details

    • ReflectConfig

      public ReflectConfig(String name, boolean allDeclaredConstructors, boolean allDeclaredMethods, boolean allDeclaredFields, boolean allPublicMethods)
      Compact constructor with validation 带验证的紧凑构造器
      Throws:
      NullPointerException - if name is null | 如果 name 为 null 抛出异常
  • Method Details

    • toJson

      public String toJson()
      Convert this entry to a JSON object string 将此条目转换为 JSON 对象字符串
      Returns:
      JSON object string | JSON 对象字符串
    • 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.
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • allDeclaredConstructors

      public boolean allDeclaredConstructors()
      Returns the value of the allDeclaredConstructors record component.
      Returns:
      the value of the allDeclaredConstructors record component
    • allDeclaredMethods

      public boolean allDeclaredMethods()
      Returns the value of the allDeclaredMethods record component.
      Returns:
      the value of the allDeclaredMethods record component
    • allDeclaredFields

      public boolean allDeclaredFields()
      Returns the value of the allDeclaredFields record component.
      Returns:
      the value of the allDeclaredFields record component
    • allPublicMethods

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