public class JavadocMethodCheck extends AbstractTypeAwareCheck
AbstractTypeAwareCheck.AbstractClassInfo, AbstractTypeAwareCheck.Token
AutomaticBean.OutputStreamOptions
Modifier and Type | Field and Description |
---|---|
static String |
MSG_CLASS_INFO
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_DUPLICATE_TAG
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_EXPECTED_TAG
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_INVALID_INHERIT_DOC
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_JAVADOC_MISSING
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_RETURN_EXPECTED
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_UNUSED_TAG
A key is pointing to the warning message text in "messages.properties"
file.
|
static String |
MSG_UNUSED_TAG_GENERAL
A key is pointing to the warning message text in "messages.properties"
file.
|
Constructor and Description |
---|
JavadocMethodCheck() |
Modifier and Type | Method and Description |
---|---|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
boolean |
isCommentNodesRequired()
Whether comment nodes are required or not.
|
protected void |
logLoadError(AbstractTypeAwareCheck.Token ident)
Logs error if unable to load class information.
|
protected void |
processAST(DetailAST ast)
Called to process an AST when visiting it.
|
void |
setAllowedAnnotations(String... userAnnotations)
Sets list of annotations.
|
void |
setAllowMissingJavadoc(boolean flag)
Controls whether to ignore errors when there is no javadoc.
|
void |
setAllowMissingParamTags(boolean flag)
Controls whether to allow a method which has parameters to omit matching
param tags in the javadoc.
|
void |
setAllowMissingPropertyJavadoc(boolean flag)
Controls whether to ignore errors when there is no javadoc for a
property accessor (setter/getter methods).
|
void |
setAllowMissingReturnTag(boolean flag)
Controls whether to allow a method which returns non-void type to omit
the return tag in the javadoc.
|
void |
setAllowMissingThrowsTags(boolean flag)
Controls whether to allow a method which declares that it throws
exceptions to omit matching throws tags in the javadoc.
|
void |
setAllowThrowsTagsForSubclasses(boolean flag)
Controls whether to allow documented exception that are subclass of one
of declared exceptions.
|
void |
setAllowUndeclaredRTE(boolean flag)
Controls whether to allow documented exceptions that are not declared if
they are a subclass of java.lang.RuntimeException.
|
void |
setExcludeScope(Scope excludeScope)
Set the excludeScope.
|
void |
setIgnoreMethodNamesRegex(Pattern pattern)
Set regex for matching method names to ignore.
|
void |
setMinLineCount(int value)
Sets minimal amount of lines in method to allow no documentation.
|
void |
setScope(Scope scope)
Set the scope.
|
void |
setValidateThrows(boolean value)
Allow validating throws tag.
|
beginTree, createClassInfo, findClassAlias, getCurrentClassName, getRequiredTokens, isSubclass, isUnchecked, leaveToken, logLoadErrorImpl, resolveClass, setLogLoadErrors, setSuppressLoadErrors, tryLoadClass, visitToken
clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, 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_MISSING
public static final String MSG_CLASS_INFO
public static final String MSG_UNUSED_TAG_GENERAL
public static final String MSG_INVALID_INHERIT_DOC
public static final String MSG_UNUSED_TAG
public static final String MSG_EXPECTED_TAG
public static final String MSG_RETURN_EXPECTED
public static final String MSG_DUPLICATE_TAG
public JavadocMethodCheck()
public void setIgnoreMethodNamesRegex(Pattern pattern)
pattern
- a pattern.public void setMinLineCount(int value)
value
- user's value.public void setValidateThrows(boolean value)
value
- user's value.public void setAllowedAnnotations(String... userAnnotations)
userAnnotations
- user's value.public void setExcludeScope(Scope excludeScope)
excludeScope
- a scope.public void setAllowUndeclaredRTE(boolean flag)
flag
- a Boolean
valuepublic void setAllowThrowsTagsForSubclasses(boolean flag)
flag
- a Boolean
valuepublic void setAllowMissingParamTags(boolean flag)
flag
- a Boolean
valuepublic void setAllowMissingThrowsTags(boolean flag)
flag
- a Boolean
valuepublic void setAllowMissingReturnTag(boolean flag)
flag
- a Boolean
valuepublic void setAllowMissingJavadoc(boolean flag)
flag
- a Boolean
valuepublic void setAllowMissingPropertyJavadoc(boolean flag)
flag
- a Boolean
valuepublic int[] getDefaultTokens()
AbstractCheck
getDefaultTokens
in class AbstractCheck
TokenTypes
public int[] getAcceptableTokens()
AbstractCheck
getAcceptableTokens
in class AbstractCheck
TokenTypes
public boolean isCommentNodesRequired()
AbstractCheck
isCommentNodesRequired
in class AbstractCheck
protected final void processAST(DetailAST ast)
AbstractTypeAwareCheck
processAST
in class AbstractTypeAwareCheck
ast
- the AST to process. Guaranteed to not be PACKAGE_DEF or
IMPORT tokens.protected final void logLoadError(AbstractTypeAwareCheck.Token ident)
AbstractTypeAwareCheck
logLoadError
in class AbstractTypeAwareCheck
ident
- class name for which we can no load class.Copyright © 2001–2018. All rights reserved.