Record Class ModuleUtil.ModuleInfo

java.lang.Object
java.lang.Record
cloud.opencode.base.reflect.module.ModuleUtil.ModuleInfo
Record Components:
moduleName - the module name, or "unnamed" for unnamed modules | 模块名,未命名模块返回 "unnamed"
packageName - the package name of the class | 类的包名
isNamed - whether the module is a named module | 是否为命名模块
isOpen - whether the package is unconditionally open | 包是否无条件开放
isExported - whether the package is unconditionally exported | 包是否无条件导出
openPackages - set of packages that are unconditionally open | 无条件开放的包集合
exportedPackages - set of packages that are unconditionally exported | 无条件导出的包集合
Enclosing class:
ModuleUtil

public static record ModuleUtil.ModuleInfo(String moduleName, String packageName, boolean isNamed, boolean isOpen, boolean isExported, Set<String> openPackages, Set<String> exportedPackages) extends Record
Module information for a class 类的模块信息
Since:
JDK 25, opencode-base-reflect V1.0.3
Author:
Leon Soo www.LeonSoo.com
See Also:
  • Constructor Details

    • ModuleInfo

      public ModuleInfo(String moduleName, String packageName, boolean isNamed, boolean isOpen, boolean isExported, Set<String> openPackages, Set<String> exportedPackages)
      Creates a ModuleInfo with validation 创建带验证的 ModuleInfo
  • 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.
    • moduleName

      public String moduleName()
      Returns the value of the moduleName record component.
      Returns:
      the value of the moduleName record component
    • packageName

      public String packageName()
      Returns the value of the packageName record component.
      Returns:
      the value of the packageName record component
    • isNamed

      public boolean isNamed()
      Returns the value of the isNamed record component.
      Returns:
      the value of the isNamed record component
    • isOpen

      public boolean isOpen()
      Returns the value of the isOpen record component.
      Returns:
      the value of the isOpen record component
    • isExported

      public boolean isExported()
      Returns the value of the isExported record component.
      Returns:
      the value of the isExported record component
    • openPackages

      public Set<String> openPackages()
      Returns the value of the openPackages record component.
      Returns:
      the value of the openPackages record component
    • exportedPackages

      public Set<String> exportedPackages()
      Returns the value of the exportedPackages record component.
      Returns:
      the value of the exportedPackages record component