|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectxtc.type.Constant
public class Constant
Representation of a type's constant value. A constant value may be one of the following:
Reference.
| Nested Class Summary | |
|---|---|
static class |
Constant.Kind
The kind. |
| Constructor Summary | |
|---|---|
Constant(java.lang.Object value)
Create a new constant value. |
|
| Method Summary | |
|---|---|
java.math.BigInteger |
bigIntValue()
Get this constant's value as a big integer. |
double |
doubleValue()
Get this constant's value as a double. |
Constant.Kind |
getKind()
Get this constant's kind. |
java.lang.Object |
getValue()
Get this constant's value. |
boolean |
isNull()
Determine whether this constant represents a null value. |
boolean |
isNumber()
Determine whether this constant's value can be treated as a number. |
boolean |
isReference()
Determine whether this constant's value is a reference. |
boolean |
isString()
Determine whether this constant's value is a string. |
boolean |
isTrue()
Determine whether this constant represents a boolean true value. |
long |
longValue()
Get this constant's value as a long. |
Reference |
refValue()
Get this constant's value as a reference. |
java.lang.String |
stringValue()
Get this constant's value as a string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Constant(java.lang.Object value)
value - The value.
java.lang.IllegalArgumentException - Signals an invalid value.| Method Detail |
|---|
public Constant.Kind getKind()
public boolean isNumber()
true if this constant's kind is an integer,
big integer, double, or character.public boolean isString()
true if this constant's value is a string.public boolean isReference()
true if this constant's value is a
reference.public java.lang.Object getValue()
public long longValue()
java.lang.IllegalStateException - Signals that this constant cannot
be converted to a long.public java.math.BigInteger bigIntValue()
java.lang.IllegalStateException - Signals that this constant cannot
be converted to a big integer.public double doubleValue()
java.lang.IllegalStateException - Signals that this constant cannot
be converted to a double.public Reference refValue()
java.lang.IllegalStateException - Signals that this constant is not a
reference.public java.lang.String stringValue()
java.lang.IllegalStateException - Signals that this constant is not a
string.public boolean isTrue()
true if this constant represents true.public boolean isNull()
true if this constant represents null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||