polyglot.visit
Class InnerClassRewriter

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.InnerClassAbstractRemover
                      extended by polyglot.visit.InnerClassRewriter
All Implemented Interfaces:
java.lang.Cloneable, Copy

public class InnerClassRewriter
extends InnerClassAbstractRemover

Author:
nystrom This class translates inner classes to static nested classes with a field pointing to the enclosing instance.

Field Summary
 
Fields inherited from class polyglot.visit.ContextVisitor
context, outer, prune, rethrowMissingDependencies
 
Fields inherited from class polyglot.visit.ErrorHandlingVisitor
error, job, nf, ts
 
Fields inherited from class polyglot.visit.HaltingVisitor
bypass, bypassParent
 
Constructor Summary
InnerClassRewriter(Job job, TypeSystem ts, NodeFactory nf)
           
 
Method Summary
protected  Node leaveCall(Node old, Node n, NodeVisitor v)
           
protected  ClassBody translateClassBody(ParsedClassType ct, ClassBody body, Context context)
           
 
Methods inherited from class polyglot.visit.InnerClassAbstractRemover
namePrefix
 
Methods inherited from class polyglot.visit.ContextVisitor
addDecls, begin, context, context, enter, enter, enterScope, leave, rethrowMissingDependencies, superEnter
 
Methods inherited from class polyglot.visit.ErrorHandlingVisitor
catchErrors, enterCall, enterCall, enterError, errorQueue, hasErrors, job, leaveCall, leaveCall, nodeFactory, typeSystem
 
Methods inherited from class polyglot.visit.HaltingVisitor
bypass, bypass, bypassChildren, override, visitChildren
 
Methods inherited from class polyglot.visit.NodeVisitor
copy, finish, finish, leave, override, toString, visitEdge, visitEdgeNoOverride
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InnerClassRewriter

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

leaveCall

protected Node leaveCall(Node old,
                         Node n,
                         NodeVisitor v)
                  throws SemanticException
Overrides:
leaveCall in class ErrorHandlingVisitor
Throws:
SemanticException

translateClassBody

protected ClassBody translateClassBody(ParsedClassType ct,
                                       ClassBody body,
                                       Context context)