com.android.dx.rop.cst
Class CstBoolean

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.CstBoolean
All Implemented Interfaces:
TypeBearer, ToHuman, Comparable<Constant>

public final class CstBoolean
extends CstLiteral32

Constants of type boolean.


Field Summary
static CstBoolean VALUE_FALSE
          non-null; instance representing false
static CstBoolean VALUE_TRUE
          non-null; instance representing true
 
Method Summary
 Type getType()
          Gets the type associated with this instance.
 boolean getValue()
          Gets the boolean value.
static CstBoolean make(boolean value)
          Makes an instance for the given value.
static CstBoolean make(int value)
          Makes an instance for the given int 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_FALSE

public static final CstBoolean VALUE_FALSE
non-null; instance representing false


VALUE_TRUE

public static final CstBoolean VALUE_TRUE
non-null; instance representing true

Method Detail

make

public static CstBoolean make(boolean value)
Makes an instance for the given value. This will return an already-allocated instance.

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

make

public static CstBoolean make(int value)
Makes an instance for the given int value. This will return an already-allocated instance.

Parameters:
value - must be either 0 or 1
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 boolean getValue()
Gets the boolean value.

Returns:
the value


Copyright © 2013. All Rights Reserved.