public final class CstKnownNull extends CstLiteralBits
null value.| Modifier and Type | Field and Description |
|---|---|
static CstKnownNull |
THE_ONE
non-null; unique instance of this class |
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareTo0(Constant other)
Compare the values of this and another instance, which are guaranteed
to be of the same class.
|
boolean |
equals(java.lang.Object other) |
boolean |
fitsInInt()
Returns whether or not this instance's value may be accurately
represented as an
int. |
int |
getIntBits()
Gets the value as
int bits. |
long |
getLongBits()
Gets the value as
long bits. |
Type |
getType()
Gets the type associated with this instance.
|
int |
hashCode() |
boolean |
isCategory2()
Returns
true if this instance is a category-2 constant,
meaning it takes up two slots in the constant pool, or
false if this instance is category-1. |
java.lang.String |
toHuman()
Return the "human" string form of this instance.
|
java.lang.String |
toString() |
java.lang.String |
typeName()
Returns the human name for the particular type of constant
this instance is.
|
fitsIn16Bits, fitsIn8BitsgetBasicFrameType, getBasicType, getFrameType, isConstantpublic static final CstKnownNull THE_ONE
non-null; unique instance of this classpublic boolean equals(java.lang.Object other)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectprotected int compareTo0(Constant other)
compareTo0 in class Constantother - non-null; the instance to compare to-1, 0, or 1, as usual
for a comparisonpublic java.lang.String toString()
toString in class java.lang.Objectpublic Type getType()
non-null; the typepublic java.lang.String typeName()
public boolean isCategory2()
true if this instance is a category-2 constant,
meaning it takes up two slots in the constant pool, or
false if this instance is category-1.isCategory2 in class Constanttrue iff this instance is category-2public java.lang.String toHuman()
toString().non-null; the human string formpublic boolean fitsInInt()
int. The rule is that if there
is an int which may be sign-extended to yield this
instance's value, then this method returns true.
Otherwise, it returns false.fitsInInt in class CstLiteralBitstrue iff this instance fits in an intpublic int getIntBits()
int bits. If this instance contains
more bits than fit in an int, then this returns only
the low-order bits.
As "literal bits," a known-null is always represented as the
number zero.getIntBits in class CstLiteralBitspublic long getLongBits()
long bits. If this instance contains
fewer bits than fit in a long, then the result of this
method is the sign extension of the value.
As "literal bits," a known-null is always represented as the
number zero.getLongBits in class CstLiteralBitsCopyright © 2020. All Rights Reserved.