Class SourceInformation

java.lang.Object
com.oracle.truffle.api.bytecode.SourceInformation
Direct Known Subclasses:
SourceInformationTree

public abstract class SourceInformation extends Object
Introspection class modeling source section information for a range of bytecodes.

Note: Introspection classes are intended to be used for debugging purposes only. These APIs may change in the future.

See Also:
  • Constructor Details

    • SourceInformation

      protected SourceInformation(Object token)
      Internal constructor for generated code. Do not use.
      Since:
      24.2
  • Method Details

    • getStartBytecodeIndex

      public abstract int getStartBytecodeIndex()
      Returns the start bytecode index for this source information object (inclusive).
      Since:
      24.2
    • getEndBytecodeIndex

      public abstract int getEndBytecodeIndex()
      Returns the end bytecode index for this source information object (exclusive).
      Since:
      24.2
    • getSourceSection

      public abstract SourceSection getSourceSection()
      Returns the source section associated with this source information object.

      The result is never null, with the possible exception of the root of a SourceInformationTree (see BytecodeNode.getSourceInformationTree()).

      Since:
      24.2
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Since:
      24.2