public final class DetailNodeTreeStringPrinter extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.String |
LINE_SEPARATOR
OS specific line separator.
|
| Modifier | Constructor and Description |
|---|---|
private |
DetailNodeTreeStringPrinter()
Prevent instances.
|
| Modifier and Type | Method and Description |
|---|---|
private static java.lang.String |
getIndentation(DetailNode node)
Get indentation for a node.
|
private static java.lang.String |
getParseErrorMessage(JavadocDetailNodeParser.ParseErrorMessage parseErrorMessage)
Builds violation base on ParseErrorMessage's violation key, its arguments, etc.
|
private static DetailNode |
parseFile(java.io.File file)
Parse a file and return the parse tree.
|
static DetailNode |
parseJavadocAsDetailNode(DetailAST blockComment)
Parse block comment DetailAST as Javadoc DetailNode tree.
|
private static DetailNode |
parseJavadocAsDetailNode(java.lang.String javadocComment)
Parse javadoc comment to DetailNode tree.
|
static java.lang.String |
printFileAst(java.io.File file)
Parse a file and print the parse tree.
|
static java.lang.String |
printTree(DetailNode ast,
java.lang.String rootPrefix,
java.lang.String prefix)
Print AST.
|
private static final java.lang.String LINE_SEPARATOR
private DetailNodeTreeStringPrinter()
public static java.lang.String printFileAst(java.io.File file) throws java.io.IOException
file - the file to print.java.io.IOException - if the file could not be read.public static DetailNode parseJavadocAsDetailNode(DetailAST blockComment)
blockComment - DetailASTjava.lang.IllegalArgumentException - if there is an error parsing the Javadoc.private static DetailNode parseJavadocAsDetailNode(java.lang.String javadocComment)
javadocComment - javadoc comment contentprivate static java.lang.String getParseErrorMessage(JavadocDetailNodeParser.ParseErrorMessage parseErrorMessage)
parseErrorMessage - ParseErrorMessagepublic static java.lang.String printTree(DetailNode ast, java.lang.String rootPrefix, java.lang.String prefix)
ast - the root AST node.rootPrefix - prefix for the root nodeprefix - prefix for other nodesprivate static java.lang.String getIndentation(DetailNode node)
node - the DetailNode to get the indentation for.private static DetailNode parseFile(java.io.File file) throws java.io.IOException
file - the file to parse.java.io.IOException - if the file could not be read.Copyright © 2001-2022. All Rights Reserved.