Package com.android.dx.dex.code
Class Dop
java.lang.Object
com.android.dx.dex.code.Dop
Representation of an opcode.
-
Constructor Summary
ConstructorDescriptionDop
(int opcode, int family, int nextOpcode, InsnFormat format, boolean hasResult) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionint
Gets the opcode family.Gets the instruction format.getName()
Gets the opcode name.int
Gets the opcode value to try next when attempting to match an opcode to particular arguments.int
Gets the opcode value.Gets the opcode for the opposite test of this instance.boolean
Returns whether this opcode uses a result register.toString()
-
Constructor Details
-
Dop
Constructs an instance.- Parameters:
opcode
-Opcodes.isValid();
the opcode value itselffamily
-Opcodes.isValid();
the opcode familynextOpcode
-Opcodes.isValid();
what opcode (by number) to try next when attempting to match an opcode to particular arguments;Opcodes.NO_NEXT
to indicate that this is the last opcode to try in a particular chainformat
-non-null;
the instruction formathasResult
- whether the opcode has a result register; if so it is always the first register
-
-
Method Details
-
toString
-
getOpcode
public int getOpcode()Gets the opcode value.- Returns:
Opcodes.MIN_VALUE..Opcodes.MAX_VALUE;
the opcode value
-
getFamily
public int getFamily()Gets the opcode family. The opcode family is the unmarked (no "/...") opcode that has equivalent semantics to this one.- Returns:
Opcodes.MIN_VALUE..Opcodes.MAX_VALUE;
the opcode family
-
getFormat
Gets the instruction format.- Returns:
non-null;
the instruction format
-
hasResult
public boolean hasResult()Returns whether this opcode uses a result register.- Returns:
true
iff this opcode uses a result register
-
getName
Gets the opcode name.- Returns:
non-null;
the opcode name
-
getNextOpcode
public int getNextOpcode()Gets the opcode value to try next when attempting to match an opcode to particular arguments. This returnsOpcodes.NO_NEXT
to indicate that this is the last opcode to try in a particular chain.- Returns:
Opcodes.MIN_VALUE..Opcodes.MAX_VALUE;
the opcode value
-
getOppositeTest
Gets the opcode for the opposite test of this instance. This is only valid for opcodes which are in fact tests.- Returns:
non-null;
the opposite test
-