| |
|
| java.lang.Object org.apache.harmony.misc.accessors.ThreadStackAccessor
ThreadStackAccessor | public class ThreadStackAccessor (Code) | | Provides access to call stack trace.
|
getCallerClass | public Class getCallerClass(int depth)(Code) | | Returns the class from the specified depth in the stack. If the
specified depth is equal to zero then the caller of the caller of this
method should be returned. Reflection stack frames should not be taken
into account.
Parameters: depth - the stack depth to get a caller class from. It is notnegative one. class a class from the stack. If there is no class in specifieddepth, null is returned. |
getCallsTrace | public StackTraceElement[] getCallsTrace()(Code) | | Collects and returns the stack of invoked methods as an array of the
StackTraceElement objects. This method may be used by security
checks implementation. It is not supposed to be used by Throwable class.
Note, that this method itself is excluded from the returned stack trace.
The most top (recently invoked) method is stored as a first element of the array.
a stack of invoked methods as an array. |
getClasses | public Class[] getClasses(int maxSize, boolean considerPrivileged)(Code) | | Collects and returns the stack of the current thread as an array of
classes. Resulting array should contain maxSize elements at the maximum.
Note that reflection stack frames should not be taken into account. The
caller of the caller of this method is stored as a first element of the
array. If considerPrivileged is true then the last element of the array
should be the caller of the most recent privileged method.
This method may be used by security checks implementation. It is not
supposed to be used by Throwable class.
Parameters: maxSize - maximum size of resulting array. If maxSize is less thanzero array may contain any number of elements. Parameters: considerPrivileged - indicates that privileged methods should betaken into account. It means if considerPrivileged is true thelast element of resulting array should be the caller of the mostrecent privileged method. If considerPrivileged is false thenprivileged methods don't affect resulting array. a stack of invoked methods as an array of classes. |
|
|
|