public class Perturbator extends ListenerAdapter
Modifier and Type | Class and Description |
---|---|
static class |
Perturbator.FieldPerturbation |
static class |
Perturbator.ParamsPerturbation |
static class |
Perturbator.Perturbation |
static class |
Perturbator.ReturnPerturbation |
Modifier and Type | Field and Description |
---|---|
protected static java.lang.Class<?>[] |
argTypes |
protected java.util.List<Perturbator.FieldPerturbation> |
fieldWatchList |
protected java.util.List<Perturbator.ParamsPerturbation> |
paramsWatchList |
protected java.util.HashMap<FieldInfo,Perturbator.FieldPerturbation> |
perturbedFields |
protected java.util.HashMap<MethodInfo,Perturbator.ParamsPerturbation> |
perturbedParams |
protected java.util.HashMap<MethodInfo,Perturbator.ReturnPerturbation> |
perturbedReturns |
protected java.util.List<Perturbator.ReturnPerturbation> |
returnWatchList |
protected StackFrame |
savedFrame |
Constructor and Description |
---|
Perturbator(Config conf) |
Modifier and Type | Method and Description |
---|---|
protected void |
addFieldPerturbations(Perturbator.FieldPerturbation p,
ClassInfo ci,
FieldInfo[] fieldInfos) |
protected void |
addToFieldWatchList(Config conf,
java.lang.String id) |
protected void |
addToParamsWatchList(Config conf,
java.lang.String id) |
protected void |
addToReturnWatchList(Config conf,
java.lang.String id) |
void |
classLoaded(VM vm,
ClassInfo loadedClass)
new class was loaded.
|
void |
executeInstruction(VM vm,
ThreadInfo ti,
Instruction insnToExecute)
VM is about to execute the next instruction
|
void |
instructionExecuted(VM vm,
ThreadInfo ti,
Instruction nextInsn,
Instruction executedInsn)
VM has executed the next instruction
(can be used to analyze branches, monitor PUTFIELD / GETFIELD and
INVOKExx / RETURN instructions)
|
protected boolean |
isMatchingInstructionLocation(Perturbator.Perturbation p,
Instruction insn) |
boolean |
isMethodWatched(Instruction insn,
MethodInfo mi) |
protected boolean |
isRelevantCallLocation(Instruction invokeInsn,
Perturbator.Perturbation p) |
protected boolean |
isRelevantCallLocation(ThreadInfo ti,
Perturbator.Perturbation p) |
choiceGeneratorAdvanced, choiceGeneratorProcessed, choiceGeneratorRegistered, choiceGeneratorSet, exceptionBailout, exceptionHandled, exceptionThrown, gcBegin, gcEnd, loadClass, methodEntered, methodExited, objectCreated, objectExposed, objectLocked, objectNotify, objectNotifyAll, objectReleased, objectShared, objectUnlocked, objectWait, propertyViolated, publishConstraintHit, publishFinished, publishProbe, publishPropertyViolation, publishStart, publishTransition, searchConstraintHit, searchFinished, searchProbed, searchStarted, stateAdvanced, stateBacktracked, stateProcessed, statePurged, stateRestored, stateStored, threadBlocked, threadInterrupted, threadNotified, threadScheduled, threadStarted, threadTerminated, threadWaiting, vmInitialized
protected static java.lang.Class<?>[] argTypes
protected java.util.List<Perturbator.FieldPerturbation> fieldWatchList
protected java.util.HashMap<FieldInfo,Perturbator.FieldPerturbation> perturbedFields
protected java.util.List<Perturbator.ReturnPerturbation> returnWatchList
protected java.util.HashMap<MethodInfo,Perturbator.ReturnPerturbation> perturbedReturns
protected java.util.List<Perturbator.ParamsPerturbation> paramsWatchList
protected java.util.HashMap<MethodInfo,Perturbator.ParamsPerturbation> perturbedParams
protected StackFrame savedFrame
public Perturbator(Config conf)
public boolean isMethodWatched(Instruction insn, MethodInfo mi)
protected void addToFieldWatchList(Config conf, java.lang.String id)
protected void addToReturnWatchList(Config conf, java.lang.String id)
protected void addToParamsWatchList(Config conf, java.lang.String id)
public void classLoaded(VM vm, ClassInfo loadedClass)
VMListener
classLoaded
in interface VMListener
classLoaded
in class ListenerAdapter
protected void addFieldPerturbations(Perturbator.FieldPerturbation p, ClassInfo ci, FieldInfo[] fieldInfos)
protected boolean isRelevantCallLocation(ThreadInfo ti, Perturbator.Perturbation p)
protected boolean isRelevantCallLocation(Instruction invokeInsn, Perturbator.Perturbation p)
public void executeInstruction(VM vm, ThreadInfo ti, Instruction insnToExecute)
VMListener
executeInstruction
in interface VMListener
executeInstruction
in class ListenerAdapter
public void instructionExecuted(VM vm, ThreadInfo ti, Instruction nextInsn, Instruction executedInsn)
VMListener
instructionExecuted
in interface VMListener
instructionExecuted
in class ListenerAdapter
protected boolean isMatchingInstructionLocation(Perturbator.Perturbation p, Instruction insn)