|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface JThread
An object JThread represents a thread in the JVM.
| Field Summary | |
|---|---|
static int |
MAX_PRIORITY
The maximum priority that a thread can have. |
static int |
MIN_PRIORITY
The minimum priority that a thread can have. |
static int |
NORM_PRIORITY
The default priority that is assigned to a thread. |
| Method Summary | |
|---|---|
void |
execNextInstruction()
Executes the next instruction of the current method. |
JClass |
getCurrentClass()
Returns the class of the method being executed. |
JStackFrame |
getCurrentFrame()
Returns the current frame of the current method. |
JClassMethod |
getCurrentMethod()
Returns the method being executed. |
JavaStack |
getJavaStack()
Returns the Java Stack of this thread. |
JOperandInput |
getOperandInput()
Returns an input stream that reads the operands of the current bytecode instruction. |
int |
getPC()
Returns the program counter value. |
int |
getPriority()
Returns this thread's priority. |
boolean |
hasMoreInstructions()
Determines if there are instructions to execute. |
void |
incPC(int offset)
Increments the program counter with the specified offset value. |
void |
pushContext(JClassMethod method)
Pushes the next execution context for the execution of the specified method. |
void |
restoreContext()
Restores the thread to its previous execution context. |
void |
setPC(int pc)
Sets the program counter with the specified value. |
void |
setPriority(int newPriority)
Changes the priority of this thread. |
| Field Detail |
|---|
static final int MIN_PRIORITY
static final int NORM_PRIORITY
static final int MAX_PRIORITY
| Method Detail |
|---|
int getPriority()
setPriority(int),
setPriority(int)void setPriority(int newPriority)
newPriority - priority to set this thread to
java.lang.IllegalArgumentException - if the priority is not in the
range MIN_PRIORITY to MAX_PRIORITY.getPriority(),
MAX_PRIORITY,
NORM_PRIORITY,
MIN_PRIORITYJavaStack getJavaStack()
JClass getCurrentClass()
JStackFrame getCurrentFrame()
JClassMethod getCurrentMethod()
int getPC()
void setPC(int pc)
pc - the program countervoid incPC(int offset)
offset - a value for increment the current program countervoid pushContext(JClassMethod method)
method - the method to be executedvoid restoreContext()
boolean hasMoreInstructions()
void execNextInstruction()
throws java.lang.Throwable
java.lang.IllegalStateException - if there isn't instruction
to execute
java.lang.Throwable - if an exception occurs during executionJOperandInput getOperandInput()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||