|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.teatrove.tea.parsetree.Node
org.teatrove.tea.parsetree.Variable
public class Variable
A Variable represents a variable declaration. A VariableRef is used to reference Variables.
VariableRef,
Serialized Form| Constructor Summary | |
|---|---|
Variable(SourceInfo info,
String name,
Type type)
Used when creating variables whose type has already been checked. |
|
Variable(SourceInfo info,
String name,
Type type,
boolean staticallyTyped)
|
|
Variable(SourceInfo info,
String name,
TypeName typeName)
Used for variable declarations. |
|
Variable(SourceInfo info,
String name,
TypeName typeName,
boolean staticallyTyped)
|
|
| Method Summary | |
|---|---|
Object |
accept(NodeVisitor visitor)
Every subclass of Node must override this method with the following: return visitor.visit(this). |
boolean |
equals(Object other)
Variables are tested for equality only by their name and type. |
String |
getName()
|
Type |
getType()
Returns null if type is unknown. |
TypeName |
getTypeName()
|
int |
hashCode()
|
boolean |
isField()
|
boolean |
isStatic()
|
boolean |
isStaticallyTyped()
|
boolean |
isTransient()
|
void |
setField(boolean b)
|
void |
setName(String name)
|
void |
setStatic(boolean b)
|
void |
setTransient(boolean b)
|
void |
setType(Type type)
|
String |
toString()
Returns a String that contains the type of this Node and source information. |
| Methods inherited from class org.teatrove.tea.parsetree.Node |
|---|
clone, getSourceInfo |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Variable(SourceInfo info,
String name,
TypeName typeName)
public Variable(SourceInfo info,
String name,
TypeName typeName,
boolean staticallyTyped)
public Variable(SourceInfo info,
String name,
Type type)
public Variable(SourceInfo info,
String name,
Type type,
boolean staticallyTyped)
| Method Detail |
|---|
public Object accept(NodeVisitor visitor)
Nodereturn visitor.visit(this).
accept in class Nodevisitor - A visitor of this Node
NodeVisitorpublic TypeName getTypeName()
public String getName()
public void setName(String name)
public Type getType()
public void setType(Type type)
public boolean isField()
public boolean isStaticallyTyped()
public boolean isStatic()
public boolean isTransient()
public void setField(boolean b)
public void setStatic(boolean b)
public void setTransient(boolean b)
public int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Objectpublic String toString()
Node
toString in class Node
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||