public class JavadocMethodCheck extends AbstractTypeAwareCheck
AbstractTypeAwareCheck.ClassInfo, AbstractTypeAwareCheck.Token| 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() |
protected boolean |
isMissingJavadocAllowed(DetailAST ast)
The JavadocMethodCheck is about to report a missing Javadoc.
|
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(String scope)
Set the excludeScope.
|
void |
setIgnoreMethodNamesRegex(String regex)
Set regex for matching method names to ignore.
|
void |
setMinLineCount(int value)
Sets minimal amount of lines in method.
|
void |
setScope(String from)
Set the scope.
|
void |
setValidateThrows(boolean value)
Allow validating throws tag.
|
beginTree, createClassInfo, findClassAlias, getCurrentClassName, getRequiredTokens, isSubclass, isUnchecked, leaveAST, leaveToken, logLoadErrorImpl, resolveClass, setLogLoadErrors, setSuppressLoadErrors, tryLoadClass, visitTokendestroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getTabWidth, getTokenNames, init, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic JavadocMethodCheck()
public void setIgnoreMethodNamesRegex(String regex)
regex - regex for matching method names.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(String scope)
scope - a String valuepublic 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()
CheckgetDefaultTokens in class CheckTokenTypespublic int[] getAcceptableTokens()
CheckgetAcceptableTokens in class CheckTokenTypespublic boolean isCommentNodesRequired()
isCommentNodesRequired in class Checkprotected final void processAST(DetailAST ast)
AbstractTypeAwareCheckprocessAST in class AbstractTypeAwareCheckast - the AST to process. Guaranteed to not be PACKAGE_DEF or
IMPORT tokens.protected final void logLoadError(AbstractTypeAwareCheck.Token ident)
AbstractTypeAwareChecklogLoadError in class AbstractTypeAwareCheckident - class name for which we can no load class.protected boolean isMissingJavadocAllowed(DetailAST ast)
allowMissingJavadoc and
allowMissingPropertyJavadoc properties, do not forget
to call super.isMissingJavadocAllowed(ast) in case
you want to keep this logic.ast - the tree node for the method or constructor.Copyright © 2001–2015. All rights reserved.