Package com.github.javaparser
Class JavadocParser
- java.lang.Object
-
- com.github.javaparser.JavadocParser
-
class JavadocParser extends java.lang.ObjectThe class responsible for parsing the content of JavadocComments and producing JavadocDocuments. The Javadoc specification.
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.regex.PatternBLOCK_PATTERNprivate static java.lang.StringBLOCK_TAG_PREFIX
-
Constructor Summary
Constructors Constructor Description JavadocParser()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static java.util.List<java.lang.String>cleanLines(java.lang.String content, boolean isMarkdownComment)private static booleanisABlockLine(java.lang.String line)static Javadocparse(JavadocComment comment)static Javadocparse(java.lang.String commentContent)static Javadocparse(java.lang.String commentContent, boolean isMarkdownComment)private static JavadocBlockTagparseBlockTag(java.lang.String line)(package private) static intstartsWithAsteriskOrMdSlash(java.lang.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.private static java.lang.StringtrimRight(java.lang.String string)
-
-
-
Method Detail
-
parse
public static Javadoc parse(JavadocComment comment)
-
parse
public static Javadoc parse(java.lang.String commentContent)
-
parse
public static Javadoc parse(java.lang.String commentContent, boolean isMarkdownComment)
-
parseBlockTag
private static JavadocBlockTag parseBlockTag(java.lang.String line)
-
isABlockLine
private static boolean isABlockLine(java.lang.String line)
-
trimRight
private static java.lang.String trimRight(java.lang.String string)
-
cleanLines
private static java.util.List<java.lang.String> cleanLines(java.lang.String content, boolean isMarkdownComment)
-
startsWithAsteriskOrMdSlash
static int startsWithAsteriskOrMdSlash(java.lang.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
-
-