Record Class AccessTransformerJarProcessor.Descriptor

java.lang.Object
java.lang.Record
dev.architectury.loom.accesstransformer.AccessTransformerJarProcessor.Descriptor
Record Components:
name - processor 名称
localAccessTransformers - 本地 AT 文件的绝对路径
tool - 启动 AT 工具所需的纯值
All Implemented Interfaces:
Serializable, MinecraftJarProcessor.ProcessorDescriptor<AccessTransformerJarProcessor>
Enclosing class:
AccessTransformerJarProcessor

public static record AccessTransformerJarProcessor.Descriptor(String name, List<String> localAccessTransformers, AccessTransformerService.Tool tool) extends Record implements MinecraftJarProcessor.ProcessorDescriptor<AccessTransformerJarProcessor>
用于在执行期重建 AccessTransformerJarProcessor 的描述符.

AT 工具的信息必须随描述符一起走:它的 classpath 来自项目依赖解析、JVM 可执行文件来自 Java 工具链,二者都只能在配置期取得。因此调用 AccessTransformerJarProcessor.descriptor() 时项目模型必须已经就绪(Minecraft provider 与 Java 工具链都已配置),否则会解析出错误的工具。

See Also:
  • Constructor Details

  • Method Details

    • createProcessor

      public AccessTransformerJarProcessor createProcessor(org.gradle.api.model.ObjectFactory objectFactory)
      Description copied from interface: MinecraftJarProcessor.ProcessorDescriptor
      使用给定的 ObjectFactory 重建 processor 实例.
      Specified by:
      createProcessor in interface MinecraftJarProcessor.ProcessorDescriptor<AccessTransformerJarProcessor>
      Parameters:
      objectFactory - 用于实例化带 @Inject 构造函数的 processor,可安全地在执行期使用
      Returns:
      重建出的 processor 实例
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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
    • localAccessTransformers

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

      Returns the value of the tool record component.
      Returns:
      the value of the tool record component