Package com.puppycrawl.tools.checkstyle
Class DetailNodeTreeStringPrinter
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.DetailNodeTreeStringPrinter
-
public final class DetailNodeTreeStringPrinter extends Object
Parses file as javadoc DetailNode tree and prints to system output stream.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DetailNodeparseJavadocAsDetailNode(DetailAST blockComment)Parse block comment DetailAST as Javadoc DetailNode tree.static StringprintFileAst(File file)Parse a file and print the parse tree.static StringprintTree(DetailNode ast, String rootPrefix, String prefix)Print AST.
-
-
-
Method Detail
-
printFileAst
public static String printFileAst(File file) throws IOException
Parse a file and print the parse tree.- Parameters:
file- the file to print.- Returns:
- parse tree as a string
- Throws:
IOException- if the file could not be read.
-
parseJavadocAsDetailNode
public static DetailNode parseJavadocAsDetailNode(DetailAST blockComment)
Parse block comment DetailAST as Javadoc DetailNode tree.- Parameters:
blockComment- DetailAST- Returns:
- DetailNode tree
-
printTree
public static String printTree(DetailNode ast, String rootPrefix, String prefix)
Print AST.- Parameters:
ast- the root AST node.rootPrefix- prefix for the root nodeprefix- prefix for other nodes- Returns:
- string AST.
-
-