Class JavadocParser

java.lang.Object
com.github.javaparser.JavadocParser

class JavadocParser extends Object
The class responsible for parsing the content of JavadocComments and producing JavadocDocuments. The Javadoc specification.
  • Field Details

    • BLOCK_TAG_PREFIX

      private static String BLOCK_TAG_PREFIX
    • BLOCK_PATTERN

      private static Pattern BLOCK_PATTERN
  • Constructor Details

    • JavadocParser

      JavadocParser()
  • Method Details

    • parse

      public static Javadoc parse(JavadocComment comment)
    • parse

      public static Javadoc parse(String commentContent)
    • parse

      public static Javadoc parse(String commentContent, boolean isMarkdownComment)
    • parseBlockTag

      private static JavadocBlockTag parseBlockTag(String line)
    • isABlockLine

      private static boolean isABlockLine(String line)
    • trimRight

      private static String trimRight(String string)
    • cleanLines

      private static List<String> cleanLines(String content, boolean isMarkdownComment)
    • startsWithAsteriskOrMdSlash

      static int startsWithAsteriskOrMdSlash(String line)
      Given a line in a block or markdown comment, this method finds the index of the * or / at the start of the line. For markdown comments where lines start with ///, this would be the index of the third /. This is used to strip the relevant prefix string when cleaning lines as part of the Javadoc parsing process. It is made visible for testing