Class SourceMap.File

java.lang.Object
org.spongepowered.asm.mixin.struct.SourceMap.File
Enclosing class:
SourceMap

public static class SourceMap.File extends Object
Defines a source code file within a source map stratum
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final int
    File index in stratum
    final int
    The base line offset for this stratum, line numbers in the output will be offset by this amount from their originals
    final int
    The size of this stratum (number of lines)
    final String
    Actual source file name to include in the smap
    final String
    Full path to the source file
  • Constructor Summary

    Constructors
    Constructor
    Description
    File(int id, int lineOffset, int size, String sourceFileName)
    Create a new SMAP Stratum
    File(int id, int lineOffset, int size, String sourceFileName, String sourceFilePath)
    Create a new SMAP Stratum
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Append lines representing this File to the supplied StringBuilder
    void
    applyOffset(org.objectweb.asm.tree.ClassNode classNode)
    Offset the line numbers in the target class node by the base lineoffset for this stratum
    void
    applyOffset(org.objectweb.asm.tree.MethodNode method)
    Offset the line numbers in the target method node by the base lineoffset for this stratum

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • id

      public final int id
      File index in stratum
    • lineOffset

      public final int lineOffset
      The base line offset for this stratum, line numbers in the output will be offset by this amount from their originals
    • size

      public final int size
      The size of this stratum (number of lines)
    • sourceFileName

      public final String sourceFileName
      Actual source file name to include in the smap
    • sourceFilePath

      public final String sourceFilePath
      Full path to the source file
  • Constructor Details

    • File

      public File(int id, int lineOffset, int size, String sourceFileName)
      Create a new SMAP Stratum
      Parameters:
      lineOffset - line offset
      size - total lines
      sourceFileName - source file name
    • File

      public File(int id, int lineOffset, int size, String sourceFileName, String sourceFilePath)
      Create a new SMAP Stratum
      Parameters:
      lineOffset - line offset
      size - total lines
      sourceFileName - source file name
      sourceFilePath - source path
  • Method Details

    • applyOffset

      public void applyOffset(org.objectweb.asm.tree.ClassNode classNode)
      Offset the line numbers in the target class node by the base lineoffset for this stratum
      Parameters:
      classNode - class to operate upon
    • applyOffset

      public void applyOffset(org.objectweb.asm.tree.MethodNode method)
      Offset the line numbers in the target method node by the base lineoffset for this stratum
      Parameters:
      method - method to operate upon
    • appendLines

      public void appendLines(StringBuilder sb)
      Append lines representing this File to the supplied StringBuilder
      Parameters:
      sb - StringBuilder to append to