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 Summary
ConstructorsConstructorDescriptionDescriptor(String name, List<String> localAccessTransformers, AccessTransformerService.Tool tool) Creates an instance of aDescriptorrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateProcessor(org.gradle.api.model.ObjectFactory objectFactory) 使用给定的ObjectFactory重建 processor 实例.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thelocalAccessTransformersrecord component.name()Returns the value of thenamerecord component.tool()Returns the value of thetoolrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Descriptor
public Descriptor(String name, List<String> localAccessTransformers, AccessTransformerService.Tool tool) Creates an instance of aDescriptorrecord class.- Parameters:
name- the value for thenamerecord componentlocalAccessTransformers- the value for thelocalAccessTransformersrecord componenttool- the value for thetoolrecord component
-
-
Method Details
-
createProcessor
public AccessTransformerJarProcessor createProcessor(org.gradle.api.model.ObjectFactory objectFactory) Description copied from interface:MinecraftJarProcessor.ProcessorDescriptor使用给定的ObjectFactory重建 processor 实例.- Specified by:
createProcessorin interfaceMinecraftJarProcessor.ProcessorDescriptor<AccessTransformerJarProcessor>- Parameters:
objectFactory- 用于实例化带@Inject构造函数的 processor,可安全地在执行期使用- Returns:
- 重建出的 processor 实例
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
localAccessTransformers
Returns the value of thelocalAccessTransformersrecord component.- Returns:
- the value of the
localAccessTransformersrecord component
-
tool
Returns the value of thetoolrecord component.- Returns:
- the value of the
toolrecord component
-