Package net.fabricmc.loom.pipeline
Record Class RemapMinecraftTaskRegistry.Producer
java.lang.Object
java.lang.Record
net.fabricmc.loom.pipeline.RemapMinecraftTaskRegistry.Producer
- Record Components:
artifact- 产物文件(绝对规范化路径)taskPath- 产出该产物的任务的绝对路径(如:a:remapMinecraftNamedMerged); 产物由配置期生产(未投影成任务)时为null
- Enclosing class:
RemapMinecraftTaskRegistry
public static record RemapMinecraftTaskRegistry.Producer(Path artifact, @Nullable String taskPath)
extends Record
一条共享产物的生产位置.
只带「产物路径」与「产出它的任务的绝对路径」两个 JDK 值:产出方可能由另一份 classloader 加载的
Loom 注册(见类注释),此时把对方的 TaskProvider 交给本 classloader 会在使用它的地方抛
ClassCastException;任务路径是字符串,交给 Task#dependsOn、
ConfigurableFileCollection#builtBy 都能被 Gradle 解析成真正的任务依赖。
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionartifact()Returns the value of theartifactrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable StringtaskPath()Returns the value of thetaskPathrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Method Details
-
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). -
artifact
Returns the value of theartifactrecord component.- Returns:
- the value of the
artifactrecord component
-
taskPath
Returns the value of thetaskPathrecord component.- Returns:
- the value of the
taskPathrecord component
-