com.android.dx.rop.code
Class CstInsn

java.lang.Object
  extended by com.android.dx.rop.code.Insn
      extended by com.android.dx.rop.code.CstInsn
All Implemented Interfaces:
ToHuman
Direct Known Subclasses:
PlainCstInsn, ThrowingCstInsn

public abstract class CstInsn
extends Insn

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
CstInsn(Rop opcode, SourcePosition position, RegisterSpec result, RegisterSpecList sources, Constant cst)
          Constructs an instance.
 
Method Summary
 boolean contentEquals(Insn b)
          Compares Insn contents, since Insn.equals() is defined to be an identity compare.
 Constant getConstant()
          Gets the constant.
 String getInlineString()
          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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CstInsn

public CstInsn(Rop opcode,
               SourcePosition position,
               RegisterSpec result,
               RegisterSpecList sources,
               Constant cst)
Constructs an instance.

Parameters:
opcode - non-null; the opcode
position - non-null; source position
result - null-ok; spec for the result, if any
sources - non-null; specs for all the sources
cst - non-null; constant
Method Detail

getInlineString

public String getInlineString()
Gets an "inline" string portion for toHuman(), if available. This is the portion that appears after the Rop opcode

Overrides:
getInlineString in class Insn
Returns:
null-ok; if non-null, the inline text for toHuman()

getConstant

public Constant getConstant()
Gets the constant.

Returns:
non-null; the constant

contentEquals

public boolean contentEquals(Insn b)
Compares Insn contents, since Insn.equals() is defined to be an identity compare. Insn's are contentEquals() if they have the same opcode, registers, source position, and other metadata.

Overrides:
contentEquals in class Insn
Returns:
true in the case described above


Copyright © 2015. All rights reserved.