Name: boT120536 Date: 04/12/2001
java version "1.3.0_02"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.0_02)
Java HotSpot(TM) Client VM (build 1.3.0_02, mixed mode)
It should be possible to walk a Threads stack.
If the Thread Class provided a method getStack() which returned a new public
Stack class (or an enumeration of StackObjects). It would be possible to walk
the Stack of a Thread.
The following would be possible, and extremely useful for logging and error
reporting, and debugging.
Stack stack = Thread.getStack() ;
Enumeration enum = stack.getAttributeNames() ;
while( enum.hasMoreElements() )
{
Object stackObject = enum.nextElement() ;
stackObject.getClass().getName() ;
stackObject.getClass().get ...
...
}
(Review ID: 120541)
======================================================================
- duplicates
-
JDK-4363318 Provide Programmatic Access to Stack Backtrace
-
- Closed
-