public class IntegerLiteral extends Literal
| Constructor and Description |
|---|
IntegerLiteral(long value)
Constructs an integer literal with the specified numeric value.
|
IntegerLiteral(long value,
java.lang.String suffix)
Constructs an integer literal with the specified value and suffix.
|
IntegerLiteral(java.lang.String _int_str)
Construct an IntegerLiteral from a string and set the proper print method
|
| Modifier and Type | Method and Description |
|---|---|
IntegerLiteral |
clone()
Returns a clone of the integer literal.
|
static void |
defaultPrint(IntegerLiteral l,
java.io.PrintWriter o)
Prints a literal to a stream.
|
boolean |
equals(java.lang.Object o)
Compares the integer literal with the specified object for equality.
|
long |
getValue()
Returns the numeric value of the integer literal.
|
int |
hashCode()
Returns the hash code of the integer literal.
|
static void |
printHex(IntegerLiteral l,
java.io.PrintWriter o)
Prints the integer literal in the hexadecimal format.
|
static void |
setClassPrintMethod(java.lang.reflect.Method m)
Overrides the class print method, so that all subsequently
created objects will use the supplied method.
|
void |
setValue(long value)
Sets the value of the integer literal with the specified numeric value.
|
java.lang.String |
toString()
Returns a string representation of the integer literal.
|
compareTo, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verifypublic IntegerLiteral(long value)
public IntegerLiteral(long value,
java.lang.String suffix)
public IntegerLiteral(java.lang.String _int_str)
public IntegerLiteral clone()
public static void defaultPrint(IntegerLiteral l, java.io.PrintWriter o)
l - The literal to print.o - The writer on which to print the literal.public java.lang.String toString()
toString in class Expressionpublic boolean equals(java.lang.Object o)
equals in class Expressiono - the object to be compared with.o!=null, this.getClass()==o.getClass(),
and this.children.equals(o.children) ||
this.children==o.children==nullpublic long getValue()
public int hashCode()
hashCode in class Expressionpublic static void printHex(IntegerLiteral l, java.io.PrintWriter o)
public static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void setValue(long value)