StackTraceElement represents an element in the stack trace returned by the
Throwable#getStackTrace method.
A stack trace element is simply a data holder. It holds the thrower, the method that threw the throwable and the arguments passed to the method that threw the throwable.
This class is also responsible for stringifying itself. This functionality is
used by the ThrowableStringifier. You can set your own stringifier to get a
custom string representation of the stack trace element via the static
method.
public function StackTraceElement(thrower, method:Function, args:Array)
Constructs a new SimpleStackTraceElement instance.
thrower | the object that declares the method that threw the throwable |
method | the method that threw the throwable |
args | the arguments passed to the throwing method |
static public function getStringifier(Void):StringifierReturns the stringifier to stringify stack trace elements.
The returned stringifier is either the default
StackTraceElementStringifier if no custom stringifier was set or if the
stringifier was set to null or the set stringifier.
the default or the custom stringifier
static public function setStringifier(stackTraceElementStringifier:Stringifier):VoidSets the stringifier to stringify stack trace elements.
If stackTraceElementStringifier is null the static
getStringifier method returns the default stringifier.
stackTraceElementStringifier | the stringifier to stringify stack trace elements |
public function getThrower(Void)Returns the object that declares the method that threw the throwable.
the object that declares the method that threw the throwable
public function getMethod(Void):FunctionReturns the method that threw the throwable.
the method that threw the throwable
public function getArguments(Void):ArrayReturns the arguments that have been passed to the method that threw the throwable.
the arguments passed to the method that threw the throwable
public function toString():StringReturns the string representation of this stack trace element.
The string representation is obtained via the stringifier returned by the static getStringifier method.
the string representation of this stack trace element
toString() in org.as2lib.core.BasicInterface