public final class AstTreeStringPrinter extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
printAst(FileText text,
boolean withComments)
Parse a file and print the parse tree.
|
static String |
printFileAst(File file,
boolean withComments)
Parse a file and print the parse tree.
|
static String |
printJavaAndJavadocTree(File file)
Prints full AST (java + comments + javadoc) of the java file.
|
public static String printFileAst(File file, boolean withComments) throws IOException, CheckstyleException
file - the file to print.withComments - true to include comments to ASTIOException - if the file could not be read.CheckstyleException - if the file is not a Java source.public static String printJavaAndJavadocTree(File file) throws IOException, CheckstyleException
file - java fileIOException - Failed to open a fileCheckstyleException - error while parsing the filepublic static String printAst(FileText text, boolean withComments) throws CheckstyleException
text - the text to parse.withComments - true to include comments to ASTCheckstyleException - if the file is not a Java source.Copyright © 2001-2017. All Rights Reserved.