implement Thread.getStackTrace, activeCount, and enumerate

This commit is contained in:
Joel Dice
2008-04-11 16:48:39 -06:00
parent 04c3abc967
commit d9ec8e20bf
5 changed files with 62 additions and 1 deletions

View File

@ -108,4 +108,14 @@ public class Thread implements Runnable {
t.sleepLock.wait(milliseconds);
}
}
public StackTraceElement[] getStackTrace() {
return Throwable.resolveTrace(getStackTrace(peer));
}
private static native Object getStackTrace(long peer);
public static native int activeCount();
public static native int enumerate(Thread[] array);
}