public class Pretty extends JCTree.Visitor
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.
| Modifier and Type | Field and Description |
|---|---|
int |
width
Indentation width (can be reassigned from outside).
|
| Constructor and Description |
|---|
Pretty(Writer out,
boolean sourceOutput) |
public Pretty(Writer out, boolean sourceOutput)
public void print(Object s) throws IOException
IOExceptionpublic void println()
throws IOException
IOExceptionpublic void printExpr(JCTree tree, int prec) throws IOException
prec - The current precedence level.IOExceptionpublic void printExpr(JCTree tree) throws IOException
IOExceptionpublic void printStat(JCTree tree) throws IOException
IOExceptionpublic <T extends JCTree> void printExprs(List<T> trees, String sep) throws IOException
sep - the separator stringIOExceptionpublic <T extends JCTree> void printExprs(List<T> trees) throws IOException
IOExceptionpublic void printStats(List<? extends JCTree> trees) throws IOException
IOExceptionpublic void printFlags(long flags)
throws IOException
IOExceptionpublic void printAnnotations(List<JCTree.JCAnnotation> trees) throws IOException
IOExceptionpublic void printTypeAnnotations(List<JCTree.JCAnnotation> trees) throws IOException
IOExceptionpublic void printDocComment(JCTree tree) throws IOException
tree - The tree for which a documentation comment should be printed.IOExceptionpublic void printTypeParameters(List<JCTree.JCTypeParameter> trees) throws IOException
IOExceptionpublic void printBlock(List<? extends JCTree> stats) throws IOException
IOExceptionpublic void printEnumBody(List<JCTree> stats) throws IOException
IOExceptionpublic void printUnit(JCTree.JCCompilationUnit tree, JCTree.JCClassDecl cdef) throws IOException
tree - The toplevel treecdef - The class definition, which is assumed to be part of the
toplevel tree.IOExceptionpublic void visitTopLevel(JCTree.JCCompilationUnit tree)
visitTopLevel in class JCTree.Visitorpublic void visitImport(JCTree.JCImport tree)
visitImport in class JCTree.Visitorpublic void visitClassDef(JCTree.JCClassDecl tree)
visitClassDef in class JCTree.Visitorpublic void visitMethodDef(JCTree.JCMethodDecl tree)
visitMethodDef in class JCTree.Visitorpublic void visitVarDef(JCTree.JCVariableDecl tree)
visitVarDef in class JCTree.Visitorpublic void visitSkip(JCTree.JCSkip tree)
visitSkip in class JCTree.Visitorpublic void visitBlock(JCTree.JCBlock tree)
visitBlock in class JCTree.Visitorpublic void visitDoLoop(JCTree.JCDoWhileLoop tree)
visitDoLoop in class JCTree.Visitorpublic void visitWhileLoop(JCTree.JCWhileLoop tree)
visitWhileLoop in class JCTree.Visitorpublic void visitForLoop(JCTree.JCForLoop tree)
visitForLoop in class JCTree.Visitorpublic void visitForeachLoop(JCTree.JCEnhancedForLoop tree)
visitForeachLoop in class JCTree.Visitorpublic void visitLabelled(JCTree.JCLabeledStatement tree)
visitLabelled in class JCTree.Visitorpublic void visitSwitch(JCTree.JCSwitch tree)
visitSwitch in class JCTree.Visitorpublic void visitCase(JCTree.JCCase tree)
visitCase in class JCTree.Visitorpublic void visitSynchronized(JCTree.JCSynchronized tree)
visitSynchronized in class JCTree.Visitorpublic void visitTry(JCTree.JCTry tree)
visitTry in class JCTree.Visitorpublic void visitCatch(JCTree.JCCatch tree)
visitCatch in class JCTree.Visitorpublic void visitConditional(JCTree.JCConditional tree)
visitConditional in class JCTree.Visitorpublic void visitIf(JCTree.JCIf tree)
visitIf in class JCTree.Visitorpublic void visitExec(JCTree.JCExpressionStatement tree)
visitExec in class JCTree.Visitorpublic void visitBreak(JCTree.JCBreak tree)
visitBreak in class JCTree.Visitorpublic void visitContinue(JCTree.JCContinue tree)
visitContinue in class JCTree.Visitorpublic void visitReturn(JCTree.JCReturn tree)
visitReturn in class JCTree.Visitorpublic void visitThrow(JCTree.JCThrow tree)
visitThrow in class JCTree.Visitorpublic void visitAssert(JCTree.JCAssert tree)
visitAssert in class JCTree.Visitorpublic void visitApply(JCTree.JCMethodInvocation tree)
visitApply in class JCTree.Visitorpublic void visitNewClass(JCTree.JCNewClass tree)
visitNewClass in class JCTree.Visitorpublic void visitNewArray(JCTree.JCNewArray tree)
visitNewArray in class JCTree.Visitorpublic void visitLambda(JCTree.JCLambda tree)
visitLambda in class JCTree.Visitorpublic void visitParens(JCTree.JCParens tree)
visitParens in class JCTree.Visitorpublic void visitAssign(JCTree.JCAssign tree)
visitAssign in class JCTree.Visitorpublic String operatorName(JCTree.Tag tag)
public void visitAssignop(JCTree.JCAssignOp tree)
visitAssignop in class JCTree.Visitorpublic void visitUnary(JCTree.JCUnary tree)
visitUnary in class JCTree.Visitorpublic void visitBinary(JCTree.JCBinary tree)
visitBinary in class JCTree.Visitorpublic void visitTypeCast(JCTree.JCTypeCast tree)
visitTypeCast in class JCTree.Visitorpublic void visitTypeTest(JCTree.JCInstanceOf tree)
visitTypeTest in class JCTree.Visitorpublic void visitIndexed(JCTree.JCArrayAccess tree)
visitIndexed in class JCTree.Visitorpublic void visitSelect(JCTree.JCFieldAccess tree)
visitSelect in class JCTree.Visitorpublic void visitReference(JCTree.JCMemberReference tree)
visitReference in class JCTree.Visitorpublic void visitIdent(JCTree.JCIdent tree)
visitIdent in class JCTree.Visitorpublic void visitLiteral(JCTree.JCLiteral tree)
visitLiteral in class JCTree.Visitorpublic void visitTypeIdent(JCTree.JCPrimitiveTypeTree tree)
visitTypeIdent in class JCTree.Visitorpublic void visitTypeArray(JCTree.JCArrayTypeTree tree)
visitTypeArray in class JCTree.Visitorpublic void visitTypeApply(JCTree.JCTypeApply tree)
visitTypeApply in class JCTree.Visitorpublic void visitTypeUnion(JCTree.JCTypeUnion tree)
visitTypeUnion in class JCTree.Visitorpublic void visitTypeIntersection(JCTree.JCTypeIntersection tree)
visitTypeIntersection in class JCTree.Visitorpublic void visitTypeParameter(JCTree.JCTypeParameter tree)
visitTypeParameter in class JCTree.Visitorpublic void visitWildcard(JCTree.JCWildcard tree)
visitWildcard in class JCTree.Visitorpublic void visitTypeBoundKind(JCTree.TypeBoundKind tree)
visitTypeBoundKind in class JCTree.Visitorpublic void visitErroneous(JCTree.JCErroneous tree)
visitErroneous in class JCTree.Visitorpublic void visitLetExpr(JCTree.LetExpr tree)
visitLetExpr in class JCTree.Visitorpublic void visitModifiers(JCTree.JCModifiers mods)
visitModifiers in class JCTree.Visitorpublic void visitAnnotation(JCTree.JCAnnotation tree)
visitAnnotation in class JCTree.Visitorpublic void visitAnnotatedType(JCTree.JCAnnotatedType tree)
visitAnnotatedType in class JCTree.Visitorpublic void visitTree(JCTree tree)
visitTree in class JCTree.VisitorCopyright © 2017 earcam. All rights reserved.