com.android.dx.rop.cst
Class CstInteger

java.lang.Object
  extended by com.android.dx.rop.cst.Constant
      extended by com.android.dx.rop.cst.TypedConstant
          extended by com.android.dx.rop.cst.CstLiteralBits
              extended by com.android.dx.rop.cst.CstLiteral32
                  extended by com.android.dx.rop.cst.CstInteger
All Implemented Interfaces:
TypeBearer, ToHuman, Comparable<Constant>

public final class CstInteger
extends CstLiteral32

Constants of type CONSTANT_Integer_info.


Field Summary
static CstInteger VALUE_0
          non-null; instance representing 0
static CstInteger VALUE_1
          non-null; instance representing 1
static CstInteger VALUE_2
          non-null; instance representing 2
static CstInteger VALUE_3
          non-null; instance representing 3
static CstInteger VALUE_4
          non-null; instance representing 4
static CstInteger VALUE_5
          non-null; instance representing 5
static CstInteger VALUE_M1
          non-null; instance representing -1
 
Method Summary
 Type getType()
          Gets the type associated with this instance.
 int getValue()
          Gets the int value.
static CstInteger make(int value)
          Makes an instance for the given value.
 String toHuman()
          Return the "human" string form of this instance.
 String toString()
          
 String typeName()
          Returns the human name for the particular type of constant this instance is.
 
Methods inherited from class com.android.dx.rop.cst.CstLiteral32
compareTo0, equals, fitsInInt, getIntBits, getLongBits, hashCode, isCategory2
 
Methods inherited from class com.android.dx.rop.cst.CstLiteralBits
fitsIn16Bits, fitsIn8Bits
 
Methods inherited from class com.android.dx.rop.cst.TypedConstant
getBasicFrameType, getBasicType, getFrameType, isConstant
 
Methods inherited from class com.android.dx.rop.cst.Constant
compareTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

VALUE_M1

public static final CstInteger VALUE_M1
non-null; instance representing -1


VALUE_0

public static final CstInteger VALUE_0
non-null; instance representing 0


VALUE_1

public static final CstInteger VALUE_1
non-null; instance representing 1


VALUE_2

public static final CstInteger VALUE_2
non-null; instance representing 2


VALUE_3

public static final CstInteger VALUE_3
non-null; instance representing 3


VALUE_4

public static final CstInteger VALUE_4
non-null; instance representing 4


VALUE_5

public static final CstInteger VALUE_5
non-null; instance representing 5

Method Detail

make

public static CstInteger make(int value)
Makes an instance for the given value. This may (but does not necessarily) return an already-allocated instance.

Parameters:
value - the int value
Returns:
non-null; the appropriate instance

toString

public String toString()

Overrides:
toString in class Object

getType

public Type getType()
Gets the type associated with this instance.

Returns:
non-null; the type

typeName

public String typeName()
Returns the human name for the particular type of constant this instance is.

Specified by:
typeName in class Constant
Returns:
non-null; the name

toHuman

public String toHuman()
Return the "human" string form of this instance. This is generally less "debuggy" than toString().

Returns:
non-null; the human string form

getValue

public int getValue()
Gets the int value.

Returns:
the value


Copyright © 2015. All rights reserved.