Record Class FileMappingsLayer

java.lang.Object
java.lang.Record
net.fabricmc.loom.configuration.providers.mappings.file.FileMappingsLayer
All Implemented Interfaces:
MappingLayer, AnnotationsLayer, UnpickLayer

public record FileMappingsLayer(Path path, String mappingPath, String fallbackSourceNamespace, String fallbackTargetNamespace, boolean enigma, boolean unpick, boolean annotations, String mergeNamespace, String fallbackUnpickConstants) extends Record implements MappingLayer, UnpickLayer, AnnotationsLayer
  • Constructor Details

    • FileMappingsLayer

      public FileMappingsLayer(Path path, String mappingPath, String fallbackSourceNamespace, String fallbackTargetNamespace, boolean enigma, boolean unpick, boolean annotations, String mergeNamespace, String fallbackUnpickConstants)
      Creates an instance of a FileMappingsLayer record class.
      Parameters:
      path - the value for the path record component
      mappingPath - the value for the mappingPath record component
      fallbackSourceNamespace - the value for the fallbackSourceNamespace record component
      fallbackTargetNamespace - the value for the fallbackTargetNamespace record component
      enigma - the value for the enigma record component
      unpick - the value for the unpick record component
      annotations - the value for the annotations record component
      mergeNamespace - the value for the mergeNamespace record component
      fallbackUnpickConstants - the value for the fallbackUnpickConstants record component
  • Method Details

    • visit

      public void visit(net.fabricmc.mappingio.MappingVisitor mappingVisitor) throws IOException
      Specified by:
      visit in interface MappingLayer
      Throws:
      IOException
    • getSourceNamespace

      public MappingsNamespace getSourceNamespace()
      Specified by:
      getSourceNamespace in interface MappingLayer
    • dependsOn

      public List<Class<? extends MappingLayer>> dependsOn()
      Description copied from interface: MappingLayer
      Provides a list of layer classes that this mapping layer depends on. If such a layer is not present an Exception will be thrown when trying to resolve the layer.
      Specified by:
      dependsOn in interface MappingLayer
      Returns:
      A list of MappingLayer classes to depend on.
    • getUnpickData

      public @Nullable UnpickLayer.UnpickData getUnpickData() throws IOException
      Specified by:
      getUnpickData in interface UnpickLayer
      Throws:
      IOException
    • getFallbackConstants

      public @Nullable String getFallbackConstants()
      Specified by:
      getFallbackConstants in interface UnpickLayer
    • getAnnotationsData

      public @Nullable AnnotationsData getAnnotationsData() throws IOException
      Specified by:
      getAnnotationsData in interface AnnotationsLayer
      Throws:
      IOException
    • 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.
    • path

      public Path path()
      Returns the value of the path record component.
      Returns:
      the value of the path record component
    • mappingPath

      public String mappingPath()
      Returns the value of the mappingPath record component.
      Returns:
      the value of the mappingPath record component
    • fallbackSourceNamespace

      public String fallbackSourceNamespace()
      Returns the value of the fallbackSourceNamespace record component.
      Returns:
      the value of the fallbackSourceNamespace record component
    • fallbackTargetNamespace

      public String fallbackTargetNamespace()
      Returns the value of the fallbackTargetNamespace record component.
      Returns:
      the value of the fallbackTargetNamespace record component
    • enigma

      public boolean enigma()
      Returns the value of the enigma record component.
      Returns:
      the value of the enigma record component
    • unpick

      public boolean unpick()
      Returns the value of the unpick record component.
      Returns:
      the value of the unpick record component
    • annotations

      public boolean annotations()
      Returns the value of the annotations record component.
      Returns:
      the value of the annotations record component
    • mergeNamespace

      public String mergeNamespace()
      Returns the value of the mergeNamespace record component.
      Returns:
      the value of the mergeNamespace record component
    • fallbackUnpickConstants

      public String fallbackUnpickConstants()
      Returns the value of the fallbackUnpickConstants record component.
      Returns:
      the value of the fallbackUnpickConstants record component