Class Simulator
java.lang.Object
com.android.dx.cf.code.Simulator
Class which knows how to simulate the effects of executing bytecode.
Note: This class is not thread-safe. If multiple threads need to use a single instance, they must synchronize access explicitly between themselves.
-
Constructor Summary
ConstructorsConstructorDescriptionSimulator
(Machine machine, ConcreteMethod method, DexOptions dexOptions) Constructs an instance. -
Method Summary
-
Constructor Details
-
Simulator
Constructs an instance.- Parameters:
machine
-non-null;
machine to use when simulatingmethod
-non-null;
method data to usedexOptions
-non-null;
options for dex output
-
-
Method Details
-
simulate
-
simulate
Simulates the effect of the instruction at the given offset, by making appropriate calls on the given frame.- Parameters:
offset
-offset >= 0;
offset of the instruction to simulateframe
-non-null;
frame to operate on- Returns:
- the length of the instruction, in bytes
-