|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.excalibur.util.StackIntrospector
A set of utilities to inspect current stack frame.
Method Summary | |
static java.lang.Class |
getCallerClass(java.lang.Class clazz)
Find the caller of the passed in Class. |
static java.lang.Class |
getCallerClass(int index)
Find the caller of the passed in Class. |
static java.lang.String |
getCallerMethod(java.lang.Class clazz)
Get the name of the method that called specified class. |
static java.lang.String |
getCallerMethod(int index)
Get the name of the method is at specified index in call stack. |
static java.lang.String[] |
getCallerStack(java.lang.Class clazz,
int count)
Return the call stack that called specified Class as an array of Strings. |
static java.lang.String[] |
getCallStackAsStringArray()
Return the current call stack as a String array. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static final java.lang.Class getCallerClass(int index) throws java.lang.SecurityException
clazz
- the Class to search for on stack to find caller ofjava.lang.SecurityException
- if an existing SecurityManager disallows construction
of another SecurityManager and thus blocks method resultspublic static final java.lang.Class getCallerClass(java.lang.Class clazz) throws java.lang.SecurityException
clazz
- the Class to search for on stack to find caller ofjava.lang.SecurityException
- if an existing SecurityManager disallows construction
of another SecurityManager and thus blocks method resultspublic static final java.lang.String getCallerMethod(int index)
public static final java.lang.String getCallerMethod(java.lang.Class clazz)
public static final java.lang.String[] getCallerStack(java.lang.Class clazz, int count)
This can be useful for debugging code to determine where calls to a method are coming from.
clazz
- the last class on the stack you are not interested in!count
- the number of stack entries to return.public static final java.lang.String[] getCallStackAsStringArray()
This can be useful for debugging code to determine where calls to a method are coming from.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |