|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.alicebot.server.core.util.StackParser
public class StackParser
Parses the stack trace. This code was adapted from a Usenet post by Simeon Fitch.
Method Summary | |
---|---|
static java.lang.String |
getStackMethod(int level)
Gets the name of the method in the stack the given number of levels down (not including call to getMethodInStack ). |
static java.lang.String |
getStackMethod(java.lang.Throwable throwable,
int level)
Gets the name of the method in the stack the given number of levels down (not including call to getMethodInStack ). |
static java.lang.String |
getStackMethodBefore(java.lang.String search,
boolean prettify)
Gets the name of the most recent method in the stack that does not include the given search string. |
static java.lang.String |
getStackString(java.lang.Throwable throwable)
Creates a string containing the stack backtrace of the given Throwable object. |
static java.util.StringTokenizer |
getStackTraceFor(java.lang.Throwable throwable)
Returns the backtrace of a given throwable as an enumeration of lines. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getStackMethod(java.lang.Throwable throwable, int level)
getMethodInStack
).
throwable
- throwable from which to get stack tracelevel
- number of stack frames to go down.
public static java.lang.String getStackMethod(int level)
getMethodInStack
).
level
- Number of stack frames to go.
public static java.lang.String getStackMethodBefore(java.lang.String search, boolean prettify)
prettify
is true, also removes
whatever looks like a package name from the result.
search
- the string which, if found in the method name, disqualifies itpublic static java.lang.String getStackString(java.lang.Throwable throwable)
throwable
- source of backtrace
public static java.util.StringTokenizer getStackTraceFor(java.lang.Throwable throwable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |