The StackTrace object represents a single stack frame
of information. The entire set of stack frames is represented as an
array of StackTrace object.
Note: The stack frame information is not always available because
some JVMs strip some or all the required information.
author: Jan Nielsen version: "$Revision: 35982 $"
Returns true if the specified object is another
StackTrace instance representing the same
execution point as this instance. Two stack trace elements
a and b are equal if and only if:
static boolean equals(Object a, Object b) {
return a==b || (a != null && a.equals(b));
}
Parameters: obj - the object to be compared with this stack traceelement true if the specified object is anotherStackTrace instance representing the sameexecution point as this instance; otherwise false
Returns the line number in the source file. If the parser is
unable to determine the line number the value -1
will be returned. If the parser determines the method is a
native, a -2 is returned.
source code line number, or -1 or -2
Returns all StackTraces in an array of the
specified throwable.
Parameters: throwable - throwable being parsed array of StackTraces throws: NullPointerException - if throwable is null throws: NullPointerException - if stackTrace is null throws: IllegalArgumentException - if stackTrace is an emptystring
Returns all StackTraces in an array. This method
is used by the Chained* concrete classes to avoid
a circular dependency. The throwable, and its string output
must both be specified. Both are required because the throwable
could be a com.sct.pipeline.lang.ChainedException
which would result in a circular dependency if a
printStackTrace was used in this method to
retrieve the trace information. Invoke this method in the
following fashion:
StringWriter stringWriter = new StringWriter();
PrintWriter printWriter = new PrintWriter(
stringWriter
);
Throwable t = new Throwable();
t.printStackTrace(
printWriter
);
printWriter.close();
StackTrace[] frames = getStackTraceElements(
t,
stringWriter.toString()
);
Parameters: throwable - throwable being parsed Parameters: stackTrace - string output ofthrowable.printStackTrace array of StackTraces throws: NullPointerException - if throwable is null throws: NullPointerException - if stackTrace is null throws: IllegalArgumentException - if stackTrace is an empty string
Returns the stack trace elements of the client. The array of
stack trace elements start with the client's invoking frame in
the zeroth element.
array of stack trace elements of the client
Returns the specified stack trace element if it exists. If an
invalid, either too large or too small, index is specified
null is returned.
Parameters: index - index of the stack trace element to return stack trace element at the index or null
Returns a string representation of the stack trace elements.
Parameters: elements - stack trace elements to stringify string representation of the stack trace array