public final class AstTreeStringPrinter extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
printAst(FileText text,
JavaParser.Options options)
Parse a file and print the parse tree.
|
static String |
printFileAst(File file,
JavaParser.Options options)
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, JavaParser.Options options) throws IOException, CheckstyleException
file - the file to print.options - JavaParser.Options to control the inclusion of comment nodes.IOException - 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, JavaParser.Options options) throws CheckstyleException
text - the text to parse.options - JavaParser.Options to control the inclusion of comment nodes.CheckstyleException - if the file is not a Java source.Copyright © 2001–2018. All rights reserved.