|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.Check
com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck
com.puppycrawl.tools.checkstyle.checks.javadoc.JavadocMethodCheck
public class JavadocMethodCheck
Checks the Javadoc of a method or constructor.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck |
---|
AbstractTypeAwareCheck.ClassInfo, AbstractTypeAwareCheck.Token |
Constructor Summary | |
---|---|
JavadocMethodCheck()
|
Method Summary | |
---|---|
int[] |
getAcceptableTokens()
The configurable token set. |
int[] |
getDefaultTokens()
Returns the default token a check is interested in. |
protected boolean |
isMissingJavadocAllowed(DetailAST aAST)
The JavadocMethodCheck is about to report a missing Javadoc. |
protected void |
logLoadError(AbstractTypeAwareCheck.Token aIdent)
Logs error if unable to load class information. |
protected void |
processAST(DetailAST aAST)
Called to process an AST when visiting it. |
void |
setAllowMissingJavadoc(boolean aFlag)
Controls whether to ignore errors when there is no javadoc. |
void |
setAllowMissingParamTags(boolean aFlag)
controls whether to allow a method which has parameters to omit matching param tags in the javadoc. |
void |
setAllowMissingPropertyJavadoc(boolean aFlag)
Controls whether to ignore errors when there is no javadoc for a property accessor (setter/getter methods). |
void |
setAllowMissingReturnTag(boolean aFlag)
controls whether to allow a method which returns non-void type to omit the return tag in the javadoc. |
void |
setAllowMissingThrowsTags(boolean aFlag)
controls whether to allow a method which declares that it throws exceptions to omit matching throws tags in the javadoc. |
void |
setAllowThrowsTagsForSubclasses(boolean aFlag)
controls whether to allow documented exception that are subclass of one of declared exceptions. |
void |
setAllowUndeclaredRTE(boolean aFlag)
controls whether to allow documented exceptions that are not declared if they are a subclass of java.lang.RuntimeException. |
void |
setExcludeScope(String aScope)
Set the excludeScope. |
void |
setScope(String aFrom)
Set the scope. |
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.AbstractTypeAwareCheck |
---|
beginTree, createClassInfo, findClassAlias, getCurrentClassName, getRequiredTokens, isSubclass, isUnchecked, leaveAST, leaveToken, logLoadErrorImpl, resolveClass, setLogLoadErrors, setSuppressLoadErrors, tryLoadClass, visitToken |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check |
---|
destroy, finishTree, getClassLoader, getFileContents, getLines, getTabWidth, getTokenNames, init, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter |
---|
getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverity |
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean |
---|
configure, contextualize, finishLocalSetup, getConfiguration, setupChild |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JavadocMethodCheck()
Method Detail |
---|
public void setScope(String aFrom)
aFrom
- a String
valuepublic void setExcludeScope(String aScope)
aScope
- a String
valuepublic void setAllowUndeclaredRTE(boolean aFlag)
aFlag
- a Boolean
valuepublic void setAllowThrowsTagsForSubclasses(boolean aFlag)
aFlag
- a Boolean
valuepublic void setAllowMissingParamTags(boolean aFlag)
aFlag
- a Boolean
valuepublic void setAllowMissingThrowsTags(boolean aFlag)
aFlag
- a Boolean
valuepublic void setAllowMissingReturnTag(boolean aFlag)
aFlag
- a Boolean
valuepublic void setAllowMissingJavadoc(boolean aFlag)
aFlag
- a Boolean
valuepublic void setAllowMissingPropertyJavadoc(boolean aFlag)
aFlag
- a Boolean
valuepublic int[] getDefaultTokens()
Check
getDefaultTokens
in class Check
TokenTypes
public int[] getAcceptableTokens()
Check
getAcceptableTokens
in class Check
TokenTypes
protected final void processAST(DetailAST aAST)
AbstractTypeAwareCheck
processAST
in class AbstractTypeAwareCheck
aAST
- the AST to process. Guaranteed to not be PACKAGE_DEF or
IMPORT tokens.protected final void logLoadError(AbstractTypeAwareCheck.Token aIdent)
AbstractTypeAwareCheck
logLoadError
in class AbstractTypeAwareCheck
aIdent
- class name for which we can no load class.protected boolean isMissingJavadocAllowed(DetailAST aAST)
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.
|
Back to the Checkstyle Home Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |