public class JavadocTagContinuationIndentationCheck extends AbstractJavadocCheck
Checks the indentation of the continuation lines in at-clauses.
Default configuration:
<module name="JavadocTagContinuationIndentation"> <property name="offset" value="4"/> </module>
Modifier and Type | Field and Description |
---|---|
private static int |
DEFAULT_INDENTATION
Default tag continuation indentation.
|
static java.lang.String |
MSG_KEY
A key is pointing to the warning message text in "messages.properties"
file.
|
private int |
offset
How many spaces to use for new indentation level.
|
MSG_JAVADOC_MISSED_HTML_CLOSE, MSG_JAVADOC_PARSE_RULE_ERROR, MSG_JAVADOC_WRONG_SINGLETON_TAG, MSG_KEY_PARSE_ERROR, MSG_KEY_UNRECOGNIZED_ANTLR_ERROR
Constructor and Description |
---|
JavadocTagContinuationIndentationCheck() |
Modifier and Type | Method and Description |
---|---|
private static java.util.List<DetailNode> |
getAllNewlineNodes(DetailNode descriptionNode)
Finds and collects all NEWLINE nodes inside DESCRIPTION node.
|
int[] |
getDefaultJavadocTokens()
Returns the default javadoc token types a check is interested in.
|
int[] |
getRequiredJavadocTokens()
The javadoc tokens that this check must be registered for.
|
private static boolean |
isInlineDescription(DetailNode description)
Checks, if description node is a description of in-line tag.
|
void |
setOffset(int offset)
Sets custom indentation level.
|
void |
visitJavadocToken(DetailNode ast)
Called to process a Javadoc token.
|
beginJavadocTree, beginTree, finishJavadocTree, finishTree, getAcceptableJavadocTokens, getAcceptableTokens, getBlockCommentAst, getDefaultTokens, getRequiredTokens, init, isCommentNodesRequired, leaveJavadocToken, setJavadocTokens, visitToken
destroy, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public static final java.lang.String MSG_KEY
private static final int DEFAULT_INDENTATION
private int offset
public JavadocTagContinuationIndentationCheck()
public void setOffset(int offset)
offset
- custom value.public int[] getDefaultJavadocTokens()
AbstractJavadocCheck
getDefaultJavadocTokens
in class AbstractJavadocCheck
JavadocTokenTypes
public int[] getRequiredJavadocTokens()
AbstractJavadocCheck
getRequiredJavadocTokens
in class AbstractJavadocCheck
JavadocTokenTypes
public void visitJavadocToken(DetailNode ast)
AbstractJavadocCheck
visitJavadocToken
in class AbstractJavadocCheck
ast
- the token to processprivate static java.util.List<DetailNode> getAllNewlineNodes(DetailNode descriptionNode)
descriptionNode
- DESCRIPTION node.private static boolean isInlineDescription(DetailNode description)
description
- DESCRIPTION node.