dalvik.system
public
final
class
dalvik.system.VMStack
VM-internal classes for examining a stack.
Summary
Public Constructors
Public Methods
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait
Details
Public Constructors
Public Methods
public
static
ClassLoader
getCallingClassLoader()
Return the defining class loader of the caller's caller.
public
static
ClassLoader
getCallingClassLoader2()
Return the defining class loader of the caller's caller's caller.
public
static
Class[]<?>
getClasses(int maxDepth, boolean stopAtPrivileged)
Create an array of classes from the methods at the top of the stack.
We continue until we reach the bottom of the stack or exceed the
specified maximum depth. If stopAtPrivileged is set, the last
element of the array will be the caller of the most-recent privileged
method.
The topmost stack frame (this method) and the one above that (the
caller) are excluded from the array. Frames with java.lang.reflect
classes are skipped over.
The classes in the array are the defining classes of the methods.
This is expected to be identical to Harmony's VMStack.getClasses.
Parameters
maxDepth
| maximum number of classes to return, or -1 for all |
stopAtPrivileged
| stop when a privileged frame is reached |
Returns
- an array with classes for the most-recent methods on the stack
Retrieve the stack trace from the specified thread.
Returns
- an array of stack trace elements, or null if the thread
doesn't have a stack trace (e.g. because it exited)