public class CharLiteral extends Literal
| Constructor and Description |
|---|
CharLiteral(char value)
Constructs a char literal with the specified character value.
|
| Modifier and Type | Method and Description |
|---|---|
CharLiteral |
clone()
Returns a clone of the char literal.
|
static void |
defaultPrint(CharLiteral l,
java.io.PrintWriter o)
Prints a literal to a stream.
|
boolean |
equals(java.lang.Object o)
Compares the char literal with the given object for equality.
|
char |
getValue()
Returns the character value of the char literal.
|
int |
hashCode()
Returns the hash code of the char literal.
|
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(char value)
Sets the value of the literal with the specified character.
|
java.lang.String |
toString()
Returns a string representation of the char literal.
|
compareTo, findExpression, getChildren, getParent, getStatement, needsParens, print, printSelf, removeChild, setChild, setParens, setParent, setPrintMethod, swapWith, verifypublic CharLiteral(char value)
value - the character value.public CharLiteral clone()
public static void defaultPrint(CharLiteral 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 char getValue()
public int hashCode()
hashCode in class Expressionpublic static void setClassPrintMethod(java.lang.reflect.Method m)
m - The new print method.public void setValue(char value)