| com.pnfsoftware.jeb.core.units.code.java.IJavaConstant |
Java AST interface to represent literal or constant value.
Constant types are: the eight primitive types (boolean, byte, char, short, int, long, float, double) and the string type.
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| abstract boolean |
getBoolean()
Retrieve the boolean value.
| ||||||||||
| abstract byte |
getByte()
Retrieve the byte value.
| ||||||||||
| abstract char |
getChar()
Retrieve the character value.
| ||||||||||
| abstract double |
getDouble()
Retrieve the double value.
| ||||||||||
| abstract float |
getFloat()
Retrieve the float value.
| ||||||||||
| abstract int |
getInt()
Retrieve the integer value.
| ||||||||||
| abstract long |
getLong()
Retrieve the long value.
| ||||||||||
| abstract short |
getShort()
Retrieve the short value.
| ||||||||||
| abstract String |
getString()
Retrieve the string value.
| ||||||||||
| abstract IJavaType |
getType()
Retrieve the constant type.
| ||||||||||
| abstract boolean |
isFalse()
Determine if a constant is the false literal.
| ||||||||||
| abstract boolean |
isMinusOne()
Determine if a constant is a numeric literal whose value is -1.
| ||||||||||
| abstract boolean |
isNegative()
Determine if a constant is a numeric literal whose value is strictly negative.
| ||||||||||
| abstract boolean |
isNull()
Determine if the constant is the 'null' literal.
| ||||||||||
| abstract boolean |
isOne()
Determine if a constant is a numeric literal whose value is 1.
| ||||||||||
| abstract boolean |
isPositive()
Determine if a constant is a numeric literal whose value is strictly positive.
| ||||||||||
| abstract boolean |
isString()
Determine if the constant is of type
java.lang.String. | ||||||||||
| abstract boolean |
isTrue()
Determine if a constant is the true literal.
| ||||||||||
| abstract boolean |
isZero()
Determine if a constant is a numeric literal whose value is 0.
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From interface
com.pnfsoftware.jeb.core.units.code.java.IJavaElement
| |||||||||||
Retrieve the boolean value.
| IllegalStateException | if the constant is not a boolean |
|---|
Retrieve the byte value.
| IllegalStateException | if the constant is not a byte |
|---|
Retrieve the character value.
| IllegalStateException | if the constant is not a char |
|---|
Retrieve the double value.
| IllegalStateException | if the constant is not a double |
|---|
Retrieve the float value.
| IllegalStateException | if the constant is not a float |
|---|
Retrieve the integer value.
| IllegalStateException | if the constant is not an int |
|---|
Retrieve the long value.
| IllegalStateException | if the constant is not a long |
|---|
Retrieve the short value.
| IllegalStateException | if the constant is not a short |
|---|
Retrieve the string value.
| IllegalStateException | if the constant is not a string |
|---|
Retrieve the constant type.
Determine if a constant is the false literal. This method does not raise.
Determine if a constant is a numeric literal whose value is -1. This method does not raise.
Determine if a constant is a numeric literal whose value is strictly negative. This method does not raise.
Determine if the constant is the 'null' literal.
Determine if a constant is a numeric literal whose value is 1. This method does not raise.
Determine if a constant is a numeric literal whose value is strictly positive. This method does not raise.
Determine if the constant is of type java.lang.String. Convenience routine.
Determine if a constant is the true literal. This method does not raise.
Determine if a constant is a numeric literal whose value is 0. This method does not raise.