com.puppycrawl.tools.checkstyle.checks.javadoc
Class JavadocMethodCheck
- Configurable, Contextualizable
public class JavadocMethodCheck
Checks the Javadoc of a method or constructor.
- Oliver Burn
- Rick Giles
- o_sukhodoslky
beginTree , createClassInfo , findClassAlias , getCurrentClassName , getRequiredTokens , isSubclass , isUnchecked , leaveAST , leaveToken , logLoadError , logLoadErrorImpl , processAST , resolveClass , setLogLoadErrors , setSuppressLoadErrors , tryLoadClass , visitToken |
beginTree , destroy , finishTree , getAcceptableTokens , getClassLoader , getDefaultTokens , getFileContents , getLines , getRequiredTokens , getTabWidth , getTokenNames , init , leaveToken , log , log , setClassLoader , setFileContents , setMessages , setTabWidth , setTokens , visitToken |
getId , getMessageBundle , getSeverity , getSeverityLevel , log , log , log , log , log , log , log , log , log , log , log , setId , setSeverity |
isMissingJavadocAllowed
protected boolean isMissingJavadocAllowed(DetailAST aAST)
The JavadocMethodCheck is about to report a missing Javadoc.
This hook can be used by derived classes to allow a missing javadoc
in some situations. The default implementation checks
allowMissingJavadoc
and
allowMissingPropertyJavadoc
properties, do not forget
to call super.isMissingJavadocAllowed(aAST)
in case
you want to keep this logic.
aAST
- the tree node for the method or constructor.
- True if this method or constructor doesn't need Javadoc.
processAST
protected final void processAST(DetailAST aAST)
Checks Javadoc comments for a method or constructor.
- processAST in interface AbstractTypeAwareCheck
aAST
- the tree node for the method or constructor.
setAllowMissingJavadoc
public void setAllowMissingJavadoc(boolean aFlag)
Controls whether to ignore errors when there is no javadoc. Defaults to
false.
setAllowMissingParamTags
public void setAllowMissingParamTags(boolean aFlag)
controls whether to allow a method which has parameters to omit matching
param tags in the javadoc. Defaults to false.
setAllowMissingPropertyJavadoc
public void setAllowMissingPropertyJavadoc(boolean aFlag)
Controls whether to ignore errors when there is no javadoc for a
property accessor (setter/getter methods). Defaults to false.
setAllowMissingReturnTag
public void setAllowMissingReturnTag(boolean aFlag)
controls whether to allow a method which returns non-void type to omit
the return tag in the javadoc. Defaults to false.
setAllowMissingThrowsTags
public void setAllowMissingThrowsTags(boolean aFlag)
controls whether to allow a method which declares that it throws
exceptions to omit matching throws tags in the javadoc. Defaults to
false.
setAllowThrowsTagsForSubclasses
public void setAllowThrowsTagsForSubclasses(boolean aFlag)
controls whether to allow documented exception that are subclass of one
of declared exceptions.
setAllowUndeclaredRTE
public void setAllowUndeclaredRTE(boolean aFlag)
controls whether to allow documented exceptions that are not declared if
they are a subclass of java.lang.RuntimeException.
setExcludeScope
public void setExcludeScope(String aScope)
Set the excludeScope.
setScope
public void setScope(String aFrom)
Set the scope.