|
||||||||||
| 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(java.lang.String rep,
java.lang.Object val,
java.lang.Class<?> typ,
SourceInfo si)
Initializes a literal |
| Method Summary | ||
|---|---|---|
|
acceptVisitor(Visitor<T> visitor)
Allows a visitor to traverse the tree |
|
java.lang.String |
getRepresentation()
Returns the representation of this object |
|
java.lang.Class<?> |
getType()
Returns the type of this expression. |
|
java.lang.Object |
getValue()
Returns the value of this expression |
|
void |
setRepresentation(java.lang.String s)
Sets the representation of this object |
|
void |
setType(java.lang.Class<?> c)
Sets the type of this object |
|
void |
setValue(java.lang.Object o)
Sets the value of this object |
|
java.lang.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(java.lang.String rep,
java.lang.Object val,
java.lang.Class<?> typ,
SourceInfo si)
rep - the representation of the literalval - the value of this literaltyp - the type of this literal
java.lang.IllegalArgumentException - if rep is null| Method Detail |
|---|
public java.lang.String getRepresentation()
public void setRepresentation(java.lang.String s)
java.lang.IllegalArgumentException - if s is nullpublic java.lang.Object getValue()
public void setValue(java.lang.Object o)
java.lang.IllegalArgumentException - if o is nullpublic java.lang.Class<?> getType()
public void setType(java.lang.Class<?> c)
public <T> T acceptVisitor(Visitor<T> visitor)
acceptVisitor in class Nodevisitor - the visitor to acceptpublic java.lang.String toString()
toString in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||