polyglot.visit
Class TypeBuilder
java.lang.Object
polyglot.visit.NodeVisitor
polyglot.visit.HaltingVisitor
polyglot.visit.TypeBuilder
- All Implemented Interfaces:
- java.lang.Cloneable, Copy
- public class TypeBuilder
- extends HaltingVisitor
Visitor which traverses the AST constructing type objects.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
importTable
protected ImportTable importTable
job
protected Job job
ts
protected TypeSystem ts
nf
protected NodeFactory nf
outer
protected TypeBuilder outer
inCode
protected boolean inCode
global
protected boolean global
type
protected ParsedClassType type
TypeBuilder
public TypeBuilder(Job job,
TypeSystem ts,
NodeFactory nf)
push
public TypeBuilder push()
pop
public TypeBuilder pop()
job
public Job job()
errorQueue
public ErrorQueue errorQueue()
nodeFactory
public NodeFactory nodeFactory()
typeSystem
public TypeSystem typeSystem()
begin
public NodeVisitor begin()
- Description copied from class:
NodeVisitor
- The begin method is called before the entire tree is visited.
This method allows the visitor to perform any initialization
that cannot be done when the visitor is created.
If
null
is returned, the ast is not traversed.
- Overrides:
begin
in class NodeVisitor
enter
public NodeVisitor enter(Node n)
- Overrides:
enter
in class NodeVisitor
leave
public Node leave(Node old,
Node n,
NodeVisitor v)
- Overrides:
leave
in class NodeVisitor
pushCode
public TypeBuilder pushCode()
pushClass
protected TypeBuilder pushClass(ParsedClassType type)
throws SemanticException
- Throws:
SemanticException
newClass
protected ParsedClassType newClass(Position pos,
Flags flags,
java.lang.String name)
pushAnonClass
public TypeBuilder pushAnonClass(Position pos)
throws SemanticException
- Throws:
SemanticException
pushClass
public TypeBuilder pushClass(Position pos,
Flags flags,
java.lang.String name)
throws SemanticException
- Throws:
SemanticException
currentClass
public ParsedClassType currentClass()
currentPackage
public Package currentPackage()
importTable
public ImportTable importTable()
setImportTable
public void setImportTable(ImportTable it)
toString
public java.lang.String toString()
- Overrides:
toString
in class NodeVisitor