Class DetailNodeTreeStringPrinter


  • public final class DetailNodeTreeStringPrinter
    extends java.lang.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 DetailNode parseJavadocAsDetailNode​(DetailAST blockComment)
      Parse block comment DetailAST as Javadoc 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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • printFileAst

        public static java.lang.String printFileAst​(java.io.File file)
                                             throws java.io.IOException
        Parse a file and print the parse tree.
        Parameters:
        file - the file to print.
        Returns:
        parse tree as a string
        Throws:
        java.io.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 java.lang.String printTree​(DetailNode ast,
                                                 java.lang.String rootPrefix,
                                                 java.lang.String prefix)
        Print AST.
        Parameters:
        ast - the root AST node.
        rootPrefix - prefix for the root node
        prefix - prefix for other nodes
        Returns:
        string AST.