Package net.fabricmc.loom.spec
Record Class EnvironmentSpec.MappingDefinition
java.lang.Object
java.lang.Record
net.fabricmc.loom.spec.EnvironmentSpec.MappingDefinition
- Record Components:
baseCoordinates- 基础映射的坐标(用户声明,例如net.fabricmc:yarn:1.20.1+build.10:v2)targetNamespace- 产物要落在哪个命名空间(named/intermediary/srg…)migrateForPlatform- 是否需要在基础映射之上做平台特有的迁移 (Forge 需要:迁移依赖补丁后的中间产物,属于 L3 的独立节点)
- All Implemented Interfaces:
Serializable
- Enclosing class:
EnvironmentSpec
public static record EnvironmentSpec.MappingDefinition(@Nullable String baseCoordinates, String targetNamespace, boolean migrateForPlatform)
extends Record
implements Serializable
映射配方:**怎么算**,而不是**算出来的东西**.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMappingDefinition(@Nullable String baseCoordinates, String targetNamespace, boolean migrateForPlatform) Creates an instance of aMappingDefinitionrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable StringReturns the value of thebaseCoordinatesrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of themigrateForPlatformrecord component.Returns the value of thetargetNamespacerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MappingDefinition
public MappingDefinition(@Nullable String baseCoordinates, String targetNamespace, boolean migrateForPlatform) Creates an instance of aMappingDefinitionrecord class.- Parameters:
baseCoordinates- the value for thebaseCoordinatesrecord componenttargetNamespace- the value for thetargetNamespacerecord componentmigrateForPlatform- the value for themigrateForPlatformrecord component
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
baseCoordinates
Returns the value of thebaseCoordinatesrecord component.- Returns:
- the value of the
baseCoordinatesrecord component
-
targetNamespace
Returns the value of thetargetNamespacerecord component.- Returns:
- the value of the
targetNamespacerecord component
-
migrateForPlatform
public boolean migrateForPlatform()Returns the value of themigrateForPlatformrecord component.- Returns:
- the value of the
migrateForPlatformrecord component
-