Package org.pkl.core

Class StackFrame

java.lang.Object
org.pkl.core.StackFrame

public final class StackFrame extends Object
An element of a Pkl stack trace.
  • Constructor Details

  • Method Details

    • getModuleUri

      public String getModuleUri()
      Returns the module URI to display for this frame. May not be a syntactically valid URI.
    • withModuleUri

      public StackFrame withModuleUri(String moduleUri)
      Returns a copy of this frame with the given module URI.
    • getMemberName

      @Nullable public @Nullable String getMemberName()
      Returns the qualified name of the property or function corresponding to this frame, if any.
    • getSourceLines

      public List<String> getSourceLines()
      Returns the lines of source code corresponding to this frame. The first line has line number getStartLine(). The last line has line number getEndLine().
    • getStartLine

      public int getStartLine()
      Returns the start line number (1-based) corresponding to this frame.
    • getStartColumn

      public int getStartColumn()
      Returns the start column number (1-based) corresponding to this frame.
    • getEndLine

      public int getEndLine()
      Returns the end line number (1-based) corresponding to this frame.
    • getEndColumn

      public int getEndColumn()
      Returns the end column number (1-based) corresponding to this frame.
    • equals

      public boolean equals(@Nullable @Nullable Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object