JavaConstant
instances that represent frequently used constant values, such as
NULL_POINTER
.
Modifier and Type | Field and Description |
---|---|
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final PrimitiveConstant | |
public static final JavaConstant | |
public static final PrimitiveConstant |
Modifier and Type | Method and Description |
---|---|
public boolean | |
public Object | Returns: the value of this constantReturns the value of this constant as a boxed Java value. |
public double | |
public float | |
public int | |
public long | |
public static JavaConstant | |
public static PrimitiveConstant | Returns: a boxed copy ofvalue the boolean value to box i)Creates a boxed boolean constant. |
public static PrimitiveConstant | Returns: the primitive constant holding thevalue the Java boxed value value)Creates a boxed constant for the given boxed primitive value. |
public static PrimitiveConstant | |
public static PrimitiveConstant | |
public static PrimitiveConstant | Returns: a boxed copy ofvalue the double value to box d)Creates a boxed double constant. |
public static PrimitiveConstant | Returns: a boxed copy ofvalue the float value to box f)Creates a boxed float constant. |
public static PrimitiveConstant | |
public static PrimitiveConstant | Returns: a boxed copy ofvalue the integer value to box i)Creates a boxed integer constant. |
public static PrimitiveConstant | forIntegerKind(JavaKind kind, long i)
Creates a |
public static PrimitiveConstant | |
public static PrimitiveConstant | |
public static PrimitiveConstant | |
public static PrimitiveConstant | forPrimitiveInt(int bits, long i)
Creates a |
public static PrimitiveConstant | Returns: a boxed copy ofvalue the short value to box i)Creates a boxed short constant. |
public JavaKind | |
public boolean | Returns: true if this constant is the default value for its kindRedeclares jdk. |
public default boolean | Returns: true if this constant is a primitive, or an object constant that is not nullChecks whether this constant is non-null. |
public boolean | |
public static boolean | |
public static String | |
public default String |
DOUBLE_0 | back to summary |
---|---|
public static final PrimitiveConstant DOUBLE_0 |
DOUBLE_1 | back to summary |
---|---|
public static final PrimitiveConstant DOUBLE_1 |
FALSE | back to summary |
---|---|
public static final PrimitiveConstant FALSE |
FLOAT_0 | back to summary |
---|---|
public static final PrimitiveConstant FLOAT_0 |
FLOAT_1 | back to summary |
---|---|
public static final PrimitiveConstant FLOAT_1 |
ILLEGAL | back to summary |
---|---|
public static final PrimitiveConstant ILLEGAL |
INT_0 | back to summary |
---|---|
public static final PrimitiveConstant INT_0 |
INT_1 | back to summary |
---|---|
public static final PrimitiveConstant INT_1 |
INT_2 | back to summary |
---|---|
public static final PrimitiveConstant INT_2 |
INT_MINUS_1 | back to summary |
---|---|
public static final PrimitiveConstant INT_MINUS_1 |
LONG_0 | back to summary |
---|---|
public static final PrimitiveConstant LONG_0 |
LONG_1 | back to summary |
---|---|
public static final PrimitiveConstant LONG_1 |
NULL_POINTER | back to summary |
---|---|
public static final JavaConstant NULL_POINTER |
TRUE | back to summary |
---|---|
public static final PrimitiveConstant TRUE |
asBoolean | back to summary |
---|---|
public boolean asBoolean() Returns the primitive boolean value this constant represents. The constant must have kind
|
asBoxedPrimitive | back to summary |
---|---|
public Object asBoxedPrimitive() Returns the value of this constant as a boxed Java value.
|
asDouble | back to summary |
---|---|
public double asDouble() Returns the primitive double value this constant represents. The constant must have kind
|
asFloat | back to summary |
---|---|
public float asFloat() Returns the primitive float value this constant represents. The constant must have kind
|
asInt | back to summary |
---|---|
public int asInt() Returns the primitive int value this constant represents. The constant must have a
|
asLong | back to summary |
---|---|
public long asLong() Returns the primitive long value this constant represents. The constant must have kind
|
defaultForKind | back to summary |
---|---|
public static JavaConstant defaultForKind(JavaKind kind) Returns a constant with the default value for the given kind. |
forBoolean | back to summary |
---|---|
public static PrimitiveConstant forBoolean(boolean i) Creates a boxed boolean constant.
|
forBoxedPrimitive | back to summary |
---|---|
public static PrimitiveConstant forBoxedPrimitive(Object value) Creates a boxed constant for the given boxed primitive value.
|
forByte | back to summary |
---|---|
public static PrimitiveConstant forByte(byte i) Creates a boxed byte constant.
|
forChar | back to summary |
---|---|
public static PrimitiveConstant forChar(char i) Creates a boxed char constant.
|
forDouble | back to summary |
---|---|
public static PrimitiveConstant forDouble(double d) Creates a boxed double constant.
|
forFloat | back to summary |
---|---|
public static PrimitiveConstant forFloat(float f) Creates a boxed float constant.
|
forIllegal | back to summary |
---|---|
public static PrimitiveConstant forIllegal() |
forInt | back to summary |
---|---|
public static PrimitiveConstant forInt(int i) Creates a boxed integer constant.
|
forIntegerKind | back to summary |
---|---|
public static PrimitiveConstant forIntegerKind(JavaKind kind, long i) Creates a |
forLong | back to summary |
---|---|
public static PrimitiveConstant forLong(long i) Creates a boxed long constant.
|
forPrimitive | back to summary |
---|---|
public static PrimitiveConstant forPrimitive(char typeChar, long rawValue) |
forPrimitive | back to summary |
---|---|
public static PrimitiveConstant forPrimitive(JavaKind kind, long rawValue) |
forPrimitiveInt | back to summary |
---|---|
public static PrimitiveConstant forPrimitiveInt(int bits, long i) Creates a |
forShort | back to summary |
---|---|
public static PrimitiveConstant forShort(short i) Creates a boxed short constant.
|
getJavaKind | back to summary |
---|---|
public JavaKind getJavaKind() Returns the Java kind of this constant. |
isDefaultForKind | back to summary |
---|---|
public boolean isDefaultForKind() Redeclares jdk. Checks whether this constant is the default value for its kind (null, 0, 0.0, false).
|
isNonNull | back to summary |
---|---|
public default boolean isNonNull() Checks whether this constant is non-null.
|
isNull | back to summary |
---|---|
public boolean isNull() Checks whether this constant is null.
|
isNull | back to summary |
---|---|
public static boolean isNull(Constant c) |
toString | back to summary |
---|---|
public static String toString(JavaConstant constant) |
toValueString | back to summary |
---|---|
public default String toValueString() Implements jdk.
|