Class DocumentParser
java.lang.Object
com.nomagic.reportwizard.tools.doc.javadoc.DocumentParser
Parse the comment string into
Document.- Since:
- Sep 3, 2008
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturn aDocumentfrom comment string.voidhandleComment(String text) Called when a JavaDoc comment is encountered.voidhandleInlineTag(String blockTag, String inlineTag, String text) Called when a JavaDoc inline tag is encountered.voidCalled when a JavaDoc block tag is encountered.voidParse the comment string.voidParse the comment string in plain text format.
-
Constructor Details
-
DocumentParser
Create the parser.- Parameters:
tool- Document Tool
-
-
Method Details
-
getDocument
Return aDocumentfrom comment string.- Returns:
- a
Document
-
parse
Parse the comment string. The JavaDoc comment must be started with /** and end with */.- Parameters:
commentText- input string with /** and end with invalid input: '*'- Throws:
DocumentException- when error while parsing document.
-
parseText
Parse the comment string in plain text format.- Parameters:
commentText- input string- Throws:
DocumentException- when error while parsing document.
-
handleTag
Called when a JavaDoc block tag is encountered.- Parameters:
tagName- tag nametext- text comment
-
handleInlineTag
Called when a JavaDoc inline tag is encountered.- Parameters:
blockTag- block tag nameinlineTag- inline tag nametext- text comment
-
handleComment
Called when a JavaDoc comment is encountered.- Parameters:
text- text comment
-