final class NullConstant extends AbstractValue implements JavaConstant
null constant.Value.IllegalValueILLEGALDOUBLE_0, DOUBLE_1, FALSE, FLOAT_0, FLOAT_1, INT_0, INT_1, INT_2, INT_MINUS_1, LONG_0, LONG_1, NULL_POINTER, TRUE| Modifier | Constructor and Description |
|---|---|
protected |
NullConstant() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
asBoolean()
Returns the primitive boolean value this constant represents.
|
Object |
asBoxedPrimitive()
Returns the value of this constant as a boxed Java value.
|
double |
asDouble()
Returns the primitive double value this constant represents.
|
float |
asFloat()
Returns the primitive float value this constant represents.
|
int |
asInt()
Returns the primitive int value this constant represents.
|
long |
asLong()
Returns the primitive long value this constant represents.
|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
isDefaultForKind()
Checks whether this constant is the default value for its kind (null, 0, 0.0, false).
|
boolean |
isNull()
Checks whether this constant is null.
|
String |
toString() |
String |
toValueString() |
getKind, getKindSuffix, getLIRKind, getPlatformKind, identityEqualsclone, finalize, getClass, notify, notifyAll, wait, wait, waitadd, defaultForKind, forBoolean, forBoxedPrimitive, forByte, forChar, forDouble, forFloat, forIllegal, forInt, forIntegerKind, forLong, forPrimitiveInt, forShort, isNonNull, isNull, mul, one, toString, zerogetLIRKind, getPlatformKind, identityEqualsgetKindprotected NullConstant()
public boolean isNull()
JavaConstantisNull in interface JavaConstanttrue if this constant is the null constantpublic boolean isDefaultForKind()
JavaConstantisDefaultForKind in interface ConstantisDefaultForKind in interface JavaConstanttrue if this constant is the default value for its kindpublic Object asBoxedPrimitive()
JavaConstantasBoxedPrimitive in interface JavaConstantpublic int asInt()
JavaConstantKind.getStackKind() of Kind.Int.asInt in interface JavaConstantpublic boolean asBoolean()
JavaConstantKind.Boolean.asBoolean in interface JavaConstantpublic long asLong()
JavaConstantKind.Long, a Kind.getStackKind() of Kind.Int.asLong in interface JavaConstantpublic float asFloat()
JavaConstantKind.Float.asFloat in interface JavaConstantpublic double asDouble()
JavaConstantKind.Double.asDouble in interface JavaConstantpublic String toValueString()
toValueString in interface ConstanttoValueString in interface JavaConstantpublic int hashCode()
hashCode in class AbstractValuepublic boolean equals(Object o)
equals in class AbstractValue