|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.tools.javac.tree.JCTree.Visitor
com.sun.tools.javac.tree.Pretty
public class Pretty
Prints out a tree as an indented Java source program.
This is NOT part of any API supported by Sun Microsystems. 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 | |
---|---|
int |
width
Indentation width (can be reassigned from outside). |
Constructor Summary | |
---|---|
Pretty(java.io.Writer out,
boolean sourceOutput)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public int width
Constructor Detail |
---|
public Pretty(java.io.Writer out, boolean sourceOutput)
Method Detail |
---|
public void print(java.lang.Object s) throws java.io.IOException
java.io.IOException
public void println() throws java.io.IOException
java.io.IOException
public void printExpr(JCTree tree, int prec) throws java.io.IOException
prec
- The current precedence level.
java.io.IOException
public void printExpr(JCTree tree) throws java.io.IOException
java.io.IOException
public void printStat(JCTree tree) throws java.io.IOException
java.io.IOException
public <T extends JCTree> void printExprs(List<T> trees, java.lang.String sep) throws java.io.IOException
sep
- the separator string
java.io.IOException
public <T extends JCTree> void printExprs(List<T> trees) throws java.io.IOException
java.io.IOException
public void printStats(List<? extends JCTree> trees) throws java.io.IOException
java.io.IOException
public void printFlags(long flags) throws java.io.IOException
java.io.IOException
public void printAnnotations(List<JCTree.JCAnnotation> trees) throws java.io.IOException
java.io.IOException
public void printDocComment(JCTree tree) throws java.io.IOException
tree
- The tree for which a documentation comment should be printed.
java.io.IOException
public void printTypeParameters(List<JCTree.JCTypeParameter> trees) throws java.io.IOException
java.io.IOException
public void printBlock(List<? extends JCTree> stats) throws java.io.IOException
java.io.IOException
public void printEnumBody(List<JCTree> stats) throws java.io.IOException
java.io.IOException
public void printUnit(JCTree.JCCompilationUnit tree, JCTree.JCClassDecl cdef) throws java.io.IOException
tree
- The toplevel treecdef
- The class definition, which is assumed to be part of the
toplevel tree.
java.io.IOException
public void visitTopLevel(JCTree.JCCompilationUnit tree)
visitTopLevel
in class JCTree.Visitor
public void visitImport(JCTree.JCImport tree)
visitImport
in class JCTree.Visitor
public void visitClassDef(JCTree.JCClassDecl tree)
visitClassDef
in class JCTree.Visitor
public void visitMethodDef(JCTree.JCMethodDecl tree)
visitMethodDef
in class JCTree.Visitor
public void visitVarDef(JCTree.JCVariableDecl tree)
visitVarDef
in class JCTree.Visitor
public void visitSkip(JCTree.JCSkip tree)
visitSkip
in class JCTree.Visitor
public void visitBlock(JCTree.JCBlock tree)
visitBlock
in class JCTree.Visitor
public void visitDoLoop(JCTree.JCDoWhileLoop tree)
visitDoLoop
in class JCTree.Visitor
public void visitWhileLoop(JCTree.JCWhileLoop tree)
visitWhileLoop
in class JCTree.Visitor
public void visitForLoop(JCTree.JCForLoop tree)
visitForLoop
in class JCTree.Visitor
public void visitForeachLoop(JCTree.JCEnhancedForLoop tree)
visitForeachLoop
in class JCTree.Visitor
public void visitLabelled(JCTree.JCLabeledStatement tree)
visitLabelled
in class JCTree.Visitor
public void visitSwitch(JCTree.JCSwitch tree)
visitSwitch
in class JCTree.Visitor
public void visitCase(JCTree.JCCase tree)
visitCase
in class JCTree.Visitor
public void visitSynchronized(JCTree.JCSynchronized tree)
visitSynchronized
in class JCTree.Visitor
public void visitTry(JCTree.JCTry tree)
visitTry
in class JCTree.Visitor
public void visitCatch(JCTree.JCCatch tree)
visitCatch
in class JCTree.Visitor
public void visitConditional(JCTree.JCConditional tree)
visitConditional
in class JCTree.Visitor
public void visitIf(JCTree.JCIf tree)
visitIf
in class JCTree.Visitor
public void visitExec(JCTree.JCExpressionStatement tree)
visitExec
in class JCTree.Visitor
public void visitBreak(JCTree.JCBreak tree)
visitBreak
in class JCTree.Visitor
public void visitContinue(JCTree.JCContinue tree)
visitContinue
in class JCTree.Visitor
public void visitReturn(JCTree.JCReturn tree)
visitReturn
in class JCTree.Visitor
public void visitThrow(JCTree.JCThrow tree)
visitThrow
in class JCTree.Visitor
public void visitAssert(JCTree.JCAssert tree)
visitAssert
in class JCTree.Visitor
public void visitApply(JCTree.JCMethodInvocation tree)
visitApply
in class JCTree.Visitor
public void visitNewClass(JCTree.JCNewClass tree)
visitNewClass
in class JCTree.Visitor
public void visitNewArray(JCTree.JCNewArray tree)
visitNewArray
in class JCTree.Visitor
public void visitParens(JCTree.JCParens tree)
visitParens
in class JCTree.Visitor
public void visitAssign(JCTree.JCAssign tree)
visitAssign
in class JCTree.Visitor
public java.lang.String operatorName(int tag)
public void visitAssignop(JCTree.JCAssignOp tree)
visitAssignop
in class JCTree.Visitor
public void visitUnary(JCTree.JCUnary tree)
visitUnary
in class JCTree.Visitor
public void visitBinary(JCTree.JCBinary tree)
visitBinary
in class JCTree.Visitor
public void visitTypeCast(JCTree.JCTypeCast tree)
visitTypeCast
in class JCTree.Visitor
public void visitTypeTest(JCTree.JCInstanceOf tree)
visitTypeTest
in class JCTree.Visitor
public void visitIndexed(JCTree.JCArrayAccess tree)
visitIndexed
in class JCTree.Visitor
public void visitSelect(JCTree.JCFieldAccess tree)
visitSelect
in class JCTree.Visitor
public void visitIdent(JCTree.JCIdent tree)
visitIdent
in class JCTree.Visitor
public void visitLiteral(JCTree.JCLiteral tree)
visitLiteral
in class JCTree.Visitor
public void visitTypeIdent(JCTree.JCPrimitiveTypeTree tree)
visitTypeIdent
in class JCTree.Visitor
public void visitTypeArray(JCTree.JCArrayTypeTree tree)
visitTypeArray
in class JCTree.Visitor
public void visitTypeApply(JCTree.JCTypeApply tree)
visitTypeApply
in class JCTree.Visitor
public void visitTypeParameter(JCTree.JCTypeParameter tree)
visitTypeParameter
in class JCTree.Visitor
public void visitWildcard(JCTree.JCWildcard tree)
visitWildcard
in class JCTree.Visitor
public void visitTypeBoundKind(JCTree.TypeBoundKind tree)
visitTypeBoundKind
in class JCTree.Visitor
public void visitErroneous(JCTree.JCErroneous tree)
visitErroneous
in class JCTree.Visitor
public void visitLetExpr(JCTree.LetExpr tree)
visitLetExpr
in class JCTree.Visitor
public void visitModifiers(JCTree.JCModifiers mods)
visitModifiers
in class JCTree.Visitor
public void visitAnnotation(JCTree.JCAnnotation tree)
visitAnnotation
in class JCTree.Visitor
public void visitTree(JCTree tree)
visitTree
in class JCTree.Visitor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |