Package com.android.dx.rop.code
Class CstInsn
java.lang.Object
com.android.dx.rop.code.Insn
com.android.dx.rop.code.CstInsn
- All Implemented Interfaces:
ToHuman
- Direct Known Subclasses:
PlainCstInsn
,ThrowingCstInsn
Instruction which contains an explicit reference to a constant.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.android.dx.rop.code.Insn
Insn.BaseVisitor, Insn.Visitor
-
Constructor Summary
ConstructorDescriptionCstInsn
(Rop opcode, SourcePosition position, RegisterSpec result, RegisterSpecList sources, Constant cst) Constructs an instance. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Compares Insn contents, sinceInsn.equals()
is defined to be an identity compare.Gets the constant.Gets an "inline" string portion for toHuman(), if available.Methods inherited from class com.android.dx.rop.code.Insn
accept, canThrow, copy, equals, getCatches, getLocalAssignment, getOpcode, getPosition, getResult, getSources, hashCode, toHuman, toHumanWithInline, toString, toStringWithInline, withAddedCatch, withNewRegisters, withRegisterOffset, withSourceLiteral
-
Constructor Details
-
CstInsn
public CstInsn(Rop opcode, SourcePosition position, RegisterSpec result, RegisterSpecList sources, Constant cst) Constructs an instance.- Parameters:
opcode
-non-null;
the opcodeposition
-non-null;
source positionresult
-null-ok;
spec for the result, if anysources
-non-null;
specs for all the sourcescst
-non-null;
constant
-
-
Method Details
-
getInlineString
Gets an "inline" string portion for toHuman(), if available. This is the portion that appears after the Rop opcode- Overrides:
getInlineString
in classInsn
- Returns:
null-ok;
if non-null, the inline text for toHuman()
-
getConstant
Gets the constant.- Returns:
non-null;
the constant
-
contentEquals
Compares Insn contents, sinceInsn.equals()
is defined to be an identity compare. Insn's arecontentEquals()
if they have the same opcode, registers, source position, and other metadata.- Overrides:
contentEquals
in classInsn
- Returns:
- true in the case described above
-