Class CstLiteral64
java.lang.Object
com.android.dx.rop.cst.Constant
com.android.dx.rop.cst.TypedConstant
com.android.dx.rop.cst.CstLiteralBits
com.android.dx.rop.cst.CstLiteral64
- All Implemented Interfaces:
TypeBearer, ToHuman, Comparable<Constant>
Constants which are literal 64-bit values of some sort.
-
Method Summary
Modifier and TypeMethodDescriptionprotected intcompareTo0(Constant other) Compare the values of this and another instance, which are guaranteed to be of the same class.final booleanfinal booleanReturns whether or not this instance's value may be accurately represented as anint.final intGets the value asintbits.final longGets the value aslongbits.final inthashCode()final booleanReturnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.Methods inherited from class CstLiteralBits
fitsIn16Bits, fitsIn8BitsMethods inherited from class TypedConstant
getBasicFrameType, getBasicType, getFrameType, isConstantMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TypeBearer
getType
-
Method Details
-
equals
-
hashCode
-
compareTo0
Compare the values of this and another instance, which are guaranteed to be of the same class. Subclasses must implement this.- Specified by:
compareTo0in classConstant- Parameters:
other-non-null;the instance to compare to- Returns:
-1,0, or1, as usual for a comparison
-
isCategory2
public final boolean isCategory2()Returnstrueif this instance is a category-2 constant, meaning it takes up two slots in the constant pool, orfalseif this instance is category-1.- Specified by:
isCategory2in classConstant- Returns:
trueiff this instance is category-2
-
fitsInInt
public final boolean fitsInInt()Returns whether or not this instance's value may be accurately represented as anint. The rule is that if there is anintwhich may be sign-extended to yield this instance's value, then this method returnstrue. Otherwise, it returnsfalse.- Specified by:
fitsInIntin classCstLiteralBits- Returns:
trueiff this instance fits in anint
-
getIntBits
public final int getIntBits()Gets the value asintbits. If this instance contains more bits than fit in anint, then this returns only the low-order bits.- Specified by:
getIntBitsin classCstLiteralBits- Returns:
- the bits
-
getLongBits
public final long getLongBits()Gets the value aslongbits. If this instance contains fewer bits than fit in along, then the result of this method is the sign extension of the value.- Specified by:
getLongBitsin classCstLiteralBits- Returns:
- the bits
-