Class JavadocParser
java.lang.Object
com.github.tadukoo.java.parsing.AbstractJavaParser
com.github.tadukoo.java.parsing.comment.JavadocParser
- All Implemented Interfaces:
JavaTokens
A parser used for parsing
Javadocs- Version:
- Beta v.0.5
- Author:
- Logan Ferree (Tadukoo)
-
Field Summary
Fields inherited from class com.github.tadukoo.java.parsing.AbstractJavaParser
MODIFIERS_REGEX, TOKEN_REGEX, WHITESPACE_MATCHERFields inherited from interface com.github.tadukoo.java.JavaTokens
ABSTRACT_MODIFIER, ANNOTATION_START_TOKEN, ASSIGNMENT_OPERATOR_TOKEN, BLOCK_CLOSE_TOKEN, BLOCK_OPEN_TOKEN, CLASS_TOKEN, EXTENDS_TOKEN, FINAL_MODIFIER, IMPLEMENTS_TOKEN, IMPORT_TOKEN, JAVADOC_AUTHOR_TOKEN, JAVADOC_LINE_TOKEN, JAVADOC_PARAM_TOKEN, JAVADOC_RETURN_TOKEN, JAVADOC_SINCE_TOKEN, JAVADOC_START_TOKEN, JAVADOC_VERSION_TOKEN, LIST_SEPARATOR_TOKEN, MODIFIERS, MULTI_LINE_COMMENT_CLOSE_TOKEN, MULTI_LINE_COMMENT_START_TOKEN, PACKAGE_TOKEN, PARAMETER_CLOSE_TOKEN, PARAMETER_OPEN_TOKEN, PRIVATE_MODIFIER, PROTECTED_MODIFIER, PUBLIC_MODIFIER, SEMICOLON, SINGLE_LINE_COMMENT_TOKEN, STATIC_MODIFIER, THROWS_TOKEN, VISIBILITY_MODIFIERS -
Method Summary
Modifier and TypeMethodDescriptionstatic JavadocparseJavadoc(String content) Parses aJavadocfrom the given content Stringstatic ParsingPojoparseJavadoc(List<String> tokens, int startToken) Parses aJavadocfrom the given tokens and starting indexMethods inherited from class com.github.tadukoo.java.parsing.AbstractJavaParser
determineFieldOrMethod, skipLeadingWhitespace, splitContentIntoTokens, verifyEndOfTokens
-
Method Details
-
parseJavadoc
Parses aJavadocfrom the given content String- Parameters:
content- The String of content to parse into aJavadoc- Returns:
- The
Javadocparsed from the given String - Throws:
JavaParsingException- If anything goes wrong in parsing
-
parseJavadoc
public static ParsingPojo parseJavadoc(List<String> tokens, int startToken) throws JavaParsingException Parses aJavadocfrom the given tokens and starting index- Parameters:
tokens- The List of tokens to be parsedstartToken- The index of the token to start parsing at- Returns:
- A
ParsingPojocontaining where we stopped parsing and theJavadoc - Throws:
JavaParsingException- If anything goes wrong during parsing
-