public final class StackTraceElement
extends java.lang.Object
StackTraceElement.
In the JavaScript ecosystem, it is common practice for stack traces to
mention column numbers in addition to line numbers. The official API of
StackTraceElement does not allow for representing column
numbers, but Scala.js supports them.
This class offers methods to manipulate the extended information of
StackTraceElement for Scala.js.
This class only contains static methods. It cannot be instantiated.
StackTraceElement| Modifier and Type | Method and Description |
|---|---|
static java.lang.StackTraceElement |
createWithColumnNumber(java.lang.String declaringClass,
java.lang.String methodName,
java.lang.String fileName,
int lineNumber,
int columnNumber)
Creates a
StackTraceElement that includes a column number. |
static int |
getColumnNumber(java.lang.StackTraceElement stackTraceElement)
Returns the column number of the provided
StackTraceElement. |
public static final java.lang.StackTraceElement createWithColumnNumber(java.lang.String declaringClass,
java.lang.String methodName,
java.lang.String fileName,
int lineNumber,
int columnNumber)
StackTraceElement that includes a column number.declaringClass - the fully qualified name of the class containing the execution point
represented by the stack trace elementmethodName - the name of the method containing the execution point represented by the
stack trace elementfileName - the name of the file containing the execution point represented by the
stack trace element, or null if this information is unavailablelineNumber - the line number of the source line containing the execution point
represented by this stack trace element, or a negative number if this
information is unavailablecolumnNumber - the column number within the source line containing the execution point
represented by this stack trace element, or a negative number if this
information is unavailableStackTraceElement containing the provided informationpublic static final int getColumnNumber(java.lang.StackTraceElement stackTraceElement)
StackTraceElement.