|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jasig.portal.lang.StackTrace
public final class StackTrace
The StackTrace object represents a single stack frame
of information. The entire set of stack frames is represented as an
array of StackTrace object.
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
Returns true |
String |
getClassName()
Returns the name of the class. |
String |
getFileName()
Returns the name of the source file. |
int |
getLineNumber()
Returns the line number in the source file. |
String |
getMethodName()
Returns the name of the method. |
static StackTrace[] |
getStackTrace()
Returns the stack trace elements of the client. |
static StackTrace |
getStackTrace(int index)
Returns the specified stack trace element if it exists. |
static StackTrace[] |
getStackTrace(Throwable throwable)
Returns all StackTraces in an array of the
specified throwable. |
int |
hashCode()
Returns a hash code value for this stack trace element. |
boolean |
isNativeMethod()
Returns true if method is implemented
natively. |
String |
toString()
Returns a representation of the stack frame element. |
static String |
toString(StackTrace[] elements)
Returns a string representation of the stack trace elements. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Method Detail |
|---|
public final String getFileName()
"Unknown" will
be returned.
public final String getClassName()
public final String getMethodName()
public final int getLineNumber()
-1
will be returned. If the parser determines the method is a
native, a -2 is returned.
public final boolean isNativeMethod()
true if method is implemented
natively.
true is native method; otherwise
falsepublic static final StackTrace[] getStackTrace(Throwable throwable)
StackTraces in an array of the
specified throwable.
throwable - throwable being parsed
StackTraces
NullPointerException - if throwable is null
NullPointerException - if stackTrace is null
IllegalArgumentException - if stackTrace is an empty
stringpublic static final StackTrace[] getStackTrace()
public static final StackTrace getStackTrace(int index)
null is returned.
index - index of the stack trace element to return
nullpublic final String toString()
toString in class Objectpublic static final String toString(StackTrace[] elements)
elements - stack trace elements to stringify
public boolean equals(Object obj)
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:
equals(a.getFileName(), b.getFileName()) &&
a.getLineNumber() == b.getLineNumber()) &&
equals(a.getClassName(), b.getClassName()) &&
equals(a.getMethodName(), b.getMethodName())
where equals is defined as:
static boolean equals(Object a, Object b) {
return a==b || (a != null && a.equals(b));
}
- Overrides:
equals in class Object
- Parameters:
obj - the object to be compared with this stack trace
element
- Returns:
true if the specified object is another
StackTrace instance representing the same
execution point as this instance; otherwise false
public int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||