Class AbstractInterceptor
- java.lang.Object
-
- com.tonic.analysis.execution.debug.AbstractInterceptor
-
- All Implemented Interfaces:
InstructionInterceptor
public abstract class AbstractInterceptor extends Object implements InstructionInterceptor
No-op base implementation ofInstructionInterceptorwhose callbacks all continue execution.
-
-
Constructor Summary
Constructors Constructor Description AbstractInterceptor()
-
Method Summary
All Methods Instance Methods Concrete 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
public InterceptorAction beforeInstruction(StackFrame frame, Instruction instruction)
Description copied from interface:InstructionInterceptorCalled just before an instruction is interpreted.- Specified by:
beforeInstructionin interfaceInstructionInterceptor- Parameters:
frame- the frame about to executeinstruction- the instruction about to run- Returns:
- whether the interpreter continues, pauses or aborts
-
afterInstruction
public void afterInstruction(StackFrame frame, Instruction instruction)
Description copied from interface:InstructionInterceptorCalled after an instruction has been interpreted.- Specified by:
afterInstructionin interfaceInstructionInterceptor- Parameters:
frame- the frame that executedinstruction- the instruction that ran
-
onMethodEntry
public InterceptorAction onMethodEntry(StackFrame frame)
Description copied from interface:InstructionInterceptorCalled when a frame has been pushed and is about to run.- Specified by:
onMethodEntryin interfaceInstructionInterceptor- Parameters:
frame- the newly pushed frame- Returns:
- whether the interpreter continues, pauses or aborts
-
onMethodExit
public void onMethodExit(StackFrame frame, ConcreteValue returnValue)
Description copied from interface:InstructionInterceptorCalled when a frame returns normally.- Specified by:
onMethodExitin interfaceInstructionInterceptor- Parameters:
frame- the returning framereturnValue- the returned value, null for a void method
-
onException
public InterceptorAction onException(StackFrame frame, ObjectInstance exception)
Description copied from interface:InstructionInterceptorCalled when an exception is raised in a frame.- Specified by:
onExceptionin interfaceInstructionInterceptor- Parameters:
frame- the frame the exception was raised inexception- the thrown exception instance- Returns:
- whether the interpreter continues, pauses or aborts
-
-