Home » openjdk-7 » com.sun.tools » javac » tree » [javadoc | source]
com.sun.tools.javac.tree
public class: TreeTranslator [javadoc | source]
java.lang.Object
   com.sun.tools.javac.tree.JCTree.Visitor
      com.sun.tools.javac.tree.TreeTranslator

Direct Known Subclasses:
    TransTypes, Lower

A subclass of Tree.Visitor, this class defines a general tree translator pattern. Translation proceeds recursively in left-to-right order down a tree, constructing translated nodes by overwriting existing ones. There is one visitor method in this class for every possible kind of tree node. To obtain a specific translator, it suffices to override those visitor methods which do some interesting work. The translator class itself takes care of all navigational aspects.

This is NOT part of any supported API. If you write code that depends on this, you do so at your own risk. This code and its internal interfaces are subject to change or deletion without notice.
Field Summary
protected  JCTree result    Visitor result field: a tree 
Method from com.sun.tools.javac.tree.TreeTranslator Summary:
translate,   translate,   translateAnnotations,   translateCases,   translateCatchers,   translateTypeParams,   translateVarDefs,   visitAnnotation,   visitApply,   visitAssert,   visitAssign,   visitAssignop,   visitBinary,   visitBlock,   visitBreak,   visitCase,   visitCatch,   visitClassDef,   visitConditional,   visitContinue,   visitDoLoop,   visitErroneous,   visitExec,   visitForLoop,   visitForeachLoop,   visitIdent,   visitIf,   visitImport,   visitIndexed,   visitLabelled,   visitLetExpr,   visitLiteral,   visitMethodDef,   visitModifiers,   visitNewArray,   visitNewClass,   visitParens,   visitReturn,   visitSelect,   visitSkip,   visitSwitch,   visitSynchronized,   visitThrow,   visitTopLevel,   visitTree,   visitTry,   visitTypeApply,   visitTypeArray,   visitTypeBoundKind,   visitTypeCast,   visitTypeIdent,   visitTypeParameter,   visitTypeTest,   visitTypeUnion,   visitUnary,   visitVarDef,   visitWhileLoop,   visitWildcard
Methods from com.sun.tools.javac.tree.JCTree$Visitor:
visitAnnotation,   visitApply,   visitAssert,   visitAssign,   visitAssignop,   visitBinary,   visitBlock,   visitBreak,   visitCase,   visitCatch,   visitClassDef,   visitConditional,   visitContinue,   visitDoLoop,   visitErroneous,   visitExec,   visitForLoop,   visitForeachLoop,   visitIdent,   visitIf,   visitImport,   visitIndexed,   visitLabelled,   visitLetExpr,   visitLiteral,   visitMethodDef,   visitModifiers,   visitNewArray,   visitNewClass,   visitParens,   visitReturn,   visitSelect,   visitSkip,   visitSwitch,   visitSynchronized,   visitThrow,   visitTopLevel,   visitTree,   visitTry,   visitTypeApply,   visitTypeArray,   visitTypeBoundKind,   visitTypeCast,   visitTypeIdent,   visitTypeParameter,   visitTypeTest,   visitTypeUnion,   visitUnary,   visitVarDef,   visitWhileLoop,   visitWildcard
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.tools.javac.tree.TreeTranslator Detail:
 public T translate(T tree) 
    Visitor method: Translate a single node.
 public List<T> translate(List<T> trees) 
    Visitor method: translate a list of nodes.
 public List<JCAnnotation> translateAnnotations(List<JCAnnotation> trees) 
    Visitor method: translate a list of catch clauses in try statements.
 public List<JCCase> translateCases(List<JCCase> trees) 
    Visitor method: translate a list of case parts of switch statements.
 public List<JCCatch> translateCatchers(List<JCCatch> trees) 
    Visitor method: translate a list of catch clauses in try statements.
 public List<JCTypeParameter> translateTypeParams(List<JCTypeParameter> trees) 
    Visitor method: translate a list of type parameters.
 public List<JCVariableDecl> translateVarDefs(List<JCVariableDecl> trees) 
    Visitor method: translate a list of variable definitions.
 public  void visitAnnotation(JCAnnotation tree) 
 public  void visitApply(JCMethodInvocation tree) 
 public  void visitAssert(JCAssert tree) 
 public  void visitAssign(JCAssign tree) 
 public  void visitAssignop(JCAssignOp tree) 
 public  void visitBinary(JCBinary tree) 
 public  void visitBlock(JCBlock tree) 
 public  void visitBreak(JCBreak tree) 
 public  void visitCase(JCCase tree) 
 public  void visitCatch(JCCatch tree) 
 public  void visitClassDef(JCClassDecl tree) 
 public  void visitConditional(JCConditional tree) 
 public  void visitContinue(JCContinue tree) 
 public  void visitDoLoop(JCDoWhileLoop tree) 
 public  void visitErroneous(JCErroneous tree) 
 public  void visitExec(JCExpressionStatement tree) 
 public  void visitForLoop(JCForLoop tree) 
 public  void visitForeachLoop(JCEnhancedForLoop tree) 
 public  void visitIdent(JCIdent tree) 
 public  void visitIf(JCIf tree) 
 public  void visitImport(JCImport tree) 
 public  void visitIndexed(JCArrayAccess tree) 
 public  void visitLabelled(JCLabeledStatement tree) 
 public  void visitLetExpr(LetExpr tree) 
 public  void visitLiteral(JCLiteral tree) 
 public  void visitMethodDef(JCMethodDecl tree) 
 public  void visitModifiers(JCModifiers tree) 
 public  void visitNewArray(JCNewArray tree) 
 public  void visitNewClass(JCNewClass tree) 
 public  void visitParens(JCParens tree) 
 public  void visitReturn(JCReturn tree) 
 public  void visitSelect(JCFieldAccess tree) 
 public  void visitSkip(JCSkip tree) 
 public  void visitSwitch(JCSwitch tree) 
 public  void visitSynchronized(JCSynchronized tree) 
 public  void visitThrow(JCThrow tree) 
 public  void visitTopLevel(JCCompilationUnit tree) 
 public  void visitTree(JCTree tree) 
 public  void visitTry(JCTry tree) 
 public  void visitTypeApply(JCTypeApply tree) 
 public  void visitTypeArray(JCArrayTypeTree tree) 
 public  void visitTypeBoundKind(TypeBoundKind tree) 
 public  void visitTypeCast(JCTypeCast tree) 
 public  void visitTypeIdent(JCPrimitiveTypeTree tree) 
 public  void visitTypeParameter(JCTypeParameter tree) 
 public  void visitTypeTest(JCInstanceOf tree) 
 public  void visitTypeUnion(JCTypeUnion tree) 
 public  void visitUnary(JCUnary tree) 
 public  void visitVarDef(JCVariableDecl tree) 
 public  void visitWhileLoop(JCWhileLoop tree) 
 public  void visitWildcard(JCWildcard tree)