|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectkoala.dynamicjava.tree.Node
koala.dynamicjava.tree.Expression
koala.dynamicjava.tree.PrimaryExpression
koala.dynamicjava.tree.Literal
public abstract class Literal
This class represents the literal nodes of the syntax tree
| Constructor Summary | |
|---|---|
protected |
Literal(String rep,
Object val,
Class<?> typ,
SourceInfo si)
Initializes a literal |
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
String |
getRepresentation()
Returns the representation of this object |
|
Class<?> |
getType()
Returns the type of this expression. |
|
Object |
getValue()
Returns the value of this expression |
|
void |
setRepresentation(String s)
Sets the representation of this object |
|
void |
setType(Class<?> c)
Sets the type of this object |
|
void |
setValue(Object o)
Sets the value of this object |
|
String |
toString()
Implementation of toString for use in unit testing |
|
| Methods inherited from class koala.dynamicjava.tree.Node |
|---|
archiveProperties, getProperties, getProperty, getSourceInfo, hasProperty, setProperty, setSourceInfo |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
protected Literal(String rep,
Object val,
Class<?> typ,
SourceInfo si)
rep - the representation of the literalval - the value of this literaltyp - the type of this literal
IllegalArgumentException - if rep is null| Method Detail |
|---|
public String getRepresentation()
public void setRepresentation(String s)
IllegalArgumentException - if s is nullpublic Object getValue()
public void setValue(Object o)
IllegalArgumentException - if o is nullpublic Class<?> getType()
public void setType(Class<?> c)
public <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class Nodevisitor - the visitor to acceptpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||