Record Class AccessTransformerService.Tool

java.lang.Object
java.lang.Record
dev.architectury.loom.accesstransformer.AccessTransformerService.Tool
Record Components:
mainClass - AT 工具的主类
classpath - AT 工具及其依赖的 jar 绝对路径
javaExecutable - 执行 AT 工具的 JVM 可执行文件;未配置 Java 工具链时为 null,表示沿用 Gradle 自身的 JVM
verboseStdout - 是否把工具的标准输出透传到构建日志
verboseStderr - 是否把工具的标准错误透传到构建日志
All Implemented Interfaces:
Serializable
Enclosing class:
AccessTransformerService

public static record AccessTransformerService.Tool(String mainClass, List<String> classpath, @Nullable String javaExecutable, boolean verboseStdout, boolean verboseStderr) extends Record implements Serializable
执行期启动 AT 工具所需的纯值.

这些值都只能在配置期解析:工具 classpath 来自项目依赖解析,JVM 可执行文件来自 Java 工具链。 解析一次后以纯值保存,执行期就能在没有 Project 的情况下重建服务选项。

See Also:
  • Constructor Details

    • Tool

      public Tool(String mainClass, List<String> classpath, @Nullable String javaExecutable, boolean verboseStdout, boolean verboseStderr)
      Creates an instance of a Tool record class.
      Parameters:
      mainClass - the value for the mainClass record component
      classpath - the value for the classpath record component
      javaExecutable - the value for the javaExecutable record component
      verboseStdout - the value for the verboseStdout record component
      verboseStderr - the value for the verboseStderr record component
  • 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 '=='.
      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.
    • mainClass

      public String mainClass()
      Returns the value of the mainClass record component.
      Returns:
      the value of the mainClass record component
    • classpath

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

      public @Nullable String javaExecutable()
      Returns the value of the javaExecutable record component.
      Returns:
      the value of the javaExecutable record component
    • verboseStdout

      public boolean verboseStdout()
      Returns the value of the verboseStdout record component.
      Returns:
      the value of the verboseStdout record component
    • verboseStderr

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