|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents one Java thread in debugged process.
Since JDI interfaces evolve from one version to another, it's strongly recommended not to implement this interface in client code. New methods can be added to this interface at any time to keep up with the JDI functionality.
Field Summary | |
static String |
PROP_CALLSTACK
Property name constant. |
static String |
PROP_VARIABLES
Property name constant. |
static int |
STATE_MONITOR
Thread state constant. |
static int |
STATE_NOT_STARTED
Thread state constant. |
static int |
STATE_RUNNING
Thread state constant. |
static int |
STATE_SLEEPING
Thread state constant. |
static int |
STATE_UNKNOWN
Thread state constant. |
static int |
STATE_WAIT
Thread state constant. |
static int |
STATE_ZOMBIE
Thread state constant. |
Method Summary | |
CallStackFrame[] |
getCallStack()
Returns call stack for this thread. |
CallStackFrame[] |
getCallStack(int from,
int to)
Returns call stack for this thread on the given indexes. |
String |
getClassName()
If this thread is suspended returns class name this thread is stopped in. |
ObjectVariable |
getContendedMonitor()
Returns monitor this thread is waiting on. |
int |
getLineNumber(String stratum)
Returns line number of the location this thread stopped at. |
String |
getMethodName()
If this thread is suspended returns method name this thread is stopped in. |
String |
getName()
Getter for the name of thread property. |
ObjectVariable[] |
getOwnedMonitors()
Returns monitors owned by this thread. |
JPDAThreadGroup |
getParentThreadGroup()
Returns parent thread group. |
String |
getSourceName(String stratum)
Returns file name this frame is stopped in or null. |
String |
getSourcePath(String stratum)
Returns source path of file this frame is stopped in or null. |
int |
getStackDepth()
Returns length of current call stack. |
int |
getState()
Returns current state of this thread. |
void |
interrupt()
Interrupts this thread unless the thread has been suspended. |
boolean |
isSuspended()
Returns true if this thread is suspended by debugger. |
void |
makeCurrent()
Sets this thread current. |
void |
resume()
Unsuspends thread. |
void |
suspend()
Suspends thread. |
Field Detail |
public static final int STATE_UNKNOWN
public static final int STATE_MONITOR
public static final int STATE_NOT_STARTED
public static final int STATE_RUNNING
public static final int STATE_SLEEPING
public static final int STATE_WAIT
public static final int STATE_ZOMBIE
public static final String PROP_CALLSTACK
public static final String PROP_VARIABLES
Method Detail |
public String getName()
public JPDAThreadGroup getParentThreadGroup()
public int getLineNumber(String stratum)
-1
otherwiseCallStackFrame
public int getState()
public boolean isSuspended()
public String getClassName()
public String getMethodName()
public void suspend()
public void resume()
public void interrupt()
public String getSourceName(String stratum) throws com.sun.jdi.AbsentInformationException
com.sun.jdi.AbsentInformationException
public String getSourcePath(String stratum) throws com.sun.jdi.AbsentInformationException
com.sun.jdi.AbsentInformationException
public CallStackFrame[] getCallStack() throws com.sun.jdi.AbsentInformationException
com.sun.jdi.AbsentInformationException
- if the thread is running or not able
to return callstack. If the thread is in an incompatible state
(e.g. running), the AbsentInformationException has
IncompatibleThreadStateException as a cause.public CallStackFrame[] getCallStack(int from, int to) throws com.sun.jdi.AbsentInformationException
from
- a from indexto
- a to index
com.sun.jdi.AbsentInformationException
- if the thread is running or not able
to return callstack. If the thread is in an incompatible state
(e.g. running), the AbsentInformationException has
IncompatibleThreadStateException as a cause.public int getStackDepth()
public void makeCurrent()
JPDADebugger.getCurrentThread()
public ObjectVariable getContendedMonitor()
public ObjectVariable[] getOwnedMonitors()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |