public abstract class AbstractJavadocCheck extends AbstractCheck
AutomaticBean.OutputStreamOptions
Modifier and Type | Field and Description |
---|---|
static String |
MSG_JAVADOC_MISSED_HTML_CLOSE
Message key of error message.
|
static String |
MSG_JAVADOC_PARSE_RULE_ERROR
Parse error while rule recognition.
|
static String |
MSG_JAVADOC_WRONG_SINGLETON_TAG
Message key of error message.
|
Constructor and Description |
---|
AbstractJavadocCheck() |
Modifier and Type | Method and Description |
---|---|
boolean |
acceptJavadocWithNonTightHtml()
This method determines if a check should process javadoc containing non-tight html tags.
|
void |
beginJavadocTree(DetailNode rootAst)
Called before the starting to process a tree.
|
void |
beginTree(DetailAST rootAST)
Called before the starting to process a tree.
|
void |
finishJavadocTree(DetailNode rootAst)
Called after finished processing a tree.
|
void |
finishTree(DetailAST rootAST)
Called after finished processing a tree.
|
int[] |
getAcceptableJavadocTokens()
The configurable javadoc token set.
|
int[] |
getAcceptableTokens()
The configurable token set.
|
protected DetailAST |
getBlockCommentAst()
Getter for block comment in Java language syntax tree.
|
abstract int[] |
getDefaultJavadocTokens()
Returns the default javadoc token types a check is interested in.
|
int[] |
getDefaultTokens()
Defined final to not allow JavadocChecks to change default tokens.
|
int[] |
getRequiredJavadocTokens()
The javadoc tokens that this check must be registered for.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
void |
init()
Initialize the check.
|
boolean |
isCommentNodesRequired()
Defined final because all JavadocChecks require comment nodes.
|
void |
leaveJavadocToken(DetailNode ast)
Called after all the child nodes have been process.
|
void |
setJavadocTokens(String... strRep)
Adds a set of tokens the check is interested in.
|
void |
setViolateExecutionOnNonTightHtml(boolean shouldReportViolation)
Setter for
violateExecutionOnNonTightHtml . |
abstract void |
visitJavadocToken(DetailNode ast)
Called to process a Javadoc token.
|
void |
visitToken(DetailAST blockCommentNode)
Called to process a token.
|
clearMessages, destroy, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, leaveToken, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokens
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
public static final String MSG_JAVADOC_MISSED_HTML_CLOSE
"no viable alternative at input 'b \n *\n'"
and it is not
clear that error is about missed close HTML tag.public static final String MSG_JAVADOC_WRONG_SINGLETON_TAG
public static final String MSG_JAVADOC_PARSE_RULE_ERROR
public AbstractJavadocCheck()
public abstract int[] getDefaultJavadocTokens()
JavadocTokenTypes
public abstract void visitJavadocToken(DetailNode ast)
ast
- the token to processpublic int[] getAcceptableJavadocTokens()
JavadocTokenTypes
public int[] getRequiredJavadocTokens()
JavadocTokenTypes
public boolean acceptJavadocWithNonTightHtml()
AbstractJavadocCheck
which
are not supposed to process javadoc containing non-tight html tags.JavadocDetailNodeParser.ParseStatus.isNonTight()
,
Tight HTML rulespublic final void setViolateExecutionOnNonTightHtml(boolean shouldReportViolation)
violateExecutionOnNonTightHtml
.shouldReportViolation
- value to which the field shall be set topublic final void setJavadocTokens(String... strRep)
strRep
- the string representation of the tokens interested inpublic void init()
AbstractCheck
init
in class AbstractCheck
public void beginJavadocTree(DetailNode rootAst)
rootAst
- the root of the treepublic void finishJavadocTree(DetailNode rootAst)
rootAst
- the root of the treepublic void leaveJavadocToken(DetailNode ast)
ast
- the token leavingpublic final int[] getDefaultTokens()
getDefaultTokens
in class AbstractCheck
TokenTypes
public final int[] getAcceptableTokens()
AbstractCheck
getAcceptableTokens
in class AbstractCheck
TokenTypes
public final int[] getRequiredTokens()
AbstractCheck
getRequiredTokens
in class AbstractCheck
TokenTypes
public final boolean isCommentNodesRequired()
isCommentNodesRequired
in class AbstractCheck
public final void beginTree(DetailAST rootAST)
AbstractCheck
beginTree
in class AbstractCheck
rootAST
- the root of the treepublic final void finishTree(DetailAST rootAST)
AbstractCheck
finishTree
in class AbstractCheck
rootAST
- the root of the treepublic final void visitToken(DetailAST blockCommentNode)
AbstractCheck
visitToken
in class AbstractCheck
blockCommentNode
- the token to processprotected DetailAST getBlockCommentAst()
Copyright © 2001–2018. All rights reserved.