polyglot.visit
Class FwdReferenceChecker

java.lang.Object
  extended by polyglot.visit.NodeVisitor
      extended by polyglot.visit.HaltingVisitor
          extended by polyglot.visit.ErrorHandlingVisitor
              extended by polyglot.visit.ContextVisitor
                  extended by polyglot.visit.FwdReferenceChecker
All Implemented Interfaces:
java.lang.Cloneable, Copy

public class FwdReferenceChecker
extends ContextVisitor

Visitor which ensures that field intializers and initializers do not make illegal forward references to fields. This is an implementation of the rules of the Java Language Spec, 2nd Edition, Section 8.3.2.3


Field Summary
 
Fields inherited from class polyglot.visit.ContextVisitor
context, outer
 
Fields inherited from class polyglot.visit.ErrorHandlingVisitor
error, job, nf, ts
 
Constructor Summary
FwdReferenceChecker(Job job, TypeSystem ts, NodeFactory nf)
           
 
Method Summary
protected  NodeVisitor enterCall(Node n)
           
 
Methods inherited from class polyglot.visit.ContextVisitor
addDecls, begin, context, context, enter, enterScope, leave, superEnter
 
Methods inherited from class polyglot.visit.ErrorHandlingVisitor
catchErrors, enterCall, enterError, errorQueue, job, leaveCall, leaveCall, nodeFactory, typeSystem
 
Methods inherited from class polyglot.visit.HaltingVisitor
bypass, bypass, bypassChildren, copy, override, visitChildren
 
Methods inherited from class polyglot.visit.NodeVisitor
enter, finish, finish, leave, override, toString, visitEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FwdReferenceChecker

public FwdReferenceChecker(Job job,
                           TypeSystem ts,
                           NodeFactory nf)
Method Detail

enterCall

protected NodeVisitor enterCall(Node n)
                         throws SemanticException
Overrides:
enterCall in class ErrorHandlingVisitor
Throws:
SemanticException