Package org.pkl.core
Class StackFrame
- java.lang.Object
-
- org.pkl.core.StackFrame
-
public final class StackFrame extends java.lang.ObjectAn element of a Pkl stack trace.
-
-
Constructor Summary
Constructors Constructor Description StackFrame(java.lang.String moduleUri, @Nullable java.lang.String memberName, java.util.List<java.lang.String> sourceLines, int startLine, int startColumn, int endLine, int endColumn)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(@Nullable java.lang.Object obj)intgetEndColumn()Returns the end column number (1-based) corresponding to this frame.intgetEndLine()Returns the end line number (1-based) corresponding to this frame.@Nullable java.lang.StringgetMemberName()Returns the qualified name of the property or function corresponding to this frame, if any.java.lang.StringgetModuleUri()Returns the module URI to display for this frame.java.util.List<java.lang.String>getSourceLines()Returns the lines of source code corresponding to this frame.intgetStartColumn()Returns the start column number (1-based) corresponding to this frame.intgetStartLine()Returns the start line number (1-based) corresponding to this frame.inthashCode()StackFramewithModuleUri(java.lang.String moduleUri)Returns a copy of this frame with the given module URI.
-
-
-
Constructor Detail
-
StackFrame
public StackFrame(java.lang.String moduleUri, @Nullable java.lang.String memberName, java.util.List<java.lang.String> sourceLines, int startLine, int startColumn, int endLine, int endColumn)
-
-
Method Detail
-
getModuleUri
public java.lang.String getModuleUri()
Returns the module URI to display for this frame. May not be a syntactically valid URI.
-
withModuleUri
public StackFrame withModuleUri(java.lang.String moduleUri)
Returns a copy of this frame with the given module URI.
-
getMemberName
public @Nullable java.lang.String getMemberName()
Returns the qualified name of the property or function corresponding to this frame, if any.
-
getSourceLines
public java.util.List<java.lang.String> getSourceLines()
Returns the lines of source code corresponding to this frame. The first line has line numbergetStartLine(). The last line has line numbergetEndLine().
-
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 java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
-