Interface InstructionInterceptor
-
- All Known Implementing Classes:
AbstractInterceptor
public interface InstructionInterceptorDebugger hook invoked around each interpreted instruction, method entry and exit, and thrown exception.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidafterInstruction(StackFrame frame, Instruction instruction)Called after an instruction has been interpreted.InterceptorActionbeforeInstruction(StackFrame frame, Instruction instruction)Called just before an instruction is interpreted.InterceptorActiononException(StackFrame frame, ObjectInstance exception)Called when an exception is raised in a frame.InterceptorActiononMethodEntry(StackFrame frame)Called when a frame has been pushed and is about to run.voidonMethodExit(StackFrame frame, ConcreteValue returnValue)Called when a frame returns normally.
-
-
-
Method Detail
-
beforeInstruction
InterceptorAction beforeInstruction(StackFrame frame, Instruction instruction)
Called just before an instruction is interpreted.- Parameters:
frame- the frame about to executeinstruction- the instruction about to run- Returns:
- whether the interpreter continues, pauses or aborts
-
afterInstruction
void afterInstruction(StackFrame frame, Instruction instruction)
Called after an instruction has been interpreted.- Parameters:
frame- the frame that executedinstruction- the instruction that ran
-
onMethodEntry
InterceptorAction onMethodEntry(StackFrame frame)
Called when a frame has been pushed and is about to run.- Parameters:
frame- the newly pushed frame- Returns:
- whether the interpreter continues, pauses or aborts
-
onMethodExit
void onMethodExit(StackFrame frame, ConcreteValue returnValue)
Called when a frame returns normally.- Parameters:
frame- the returning framereturnValue- the returned value, null for a void method
-
onException
InterceptorAction onException(StackFrame frame, ObjectInstance exception)
Called when an exception is raised in a frame.- Parameters:
frame- the frame the exception was raised inexception- the thrown exception instance- Returns:
- whether the interpreter continues, pauses or aborts
-
-