public class MissingJavadocPackageCheck extends AbstractCheck
Checks for missing Javadoc comments in package-info.java files.
Rationale: description and other related documentation for a package can be written up in the package-info.java file and it gets used in the production of the Javadocs. See link for more info.
To configure the check:
<module name="MissingJavadocPackage"/>
Example:
/** * Provides API classes */ package com.checkstyle.api; // no violation /* * Block comment is not a javadoc */ package com.checkstyle.api; // violation
Parent is com.puppycrawl.tools.checkstyle.TreeWalker
Violation Message Keys:
package.javadoc.missing
AutomaticBean.OutputStreamOptions| Modifier and Type | Field and Description |
|---|---|
static String |
MSG_PKG_JAVADOC_MISSING
A key is pointing to the warning message text in "messages.properties"
file.
|
| Constructor and Description |
|---|
MissingJavadocPackageCheck() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens()
The configurable token set.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
int[] |
getRequiredTokens()
The tokens that this check must be registered for.
|
boolean |
isCommentNodesRequired()
Whether comment nodes are required or not.
|
void |
visitToken(DetailAST ast)
Called to process a token.
|
beginTree, clearMessages, destroy, finishTree, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, leaveToken, log, log, log, setFileContents, setTabWidth, setTokensfinishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverityconfigure, contextualize, getConfiguration, setupChildpublic static final String MSG_PKG_JAVADOC_MISSING
public MissingJavadocPackageCheck()
public int[] getDefaultTokens()
AbstractCheckgetDefaultTokens in class AbstractCheckTokenTypespublic int[] getAcceptableTokens()
AbstractCheckgetAcceptableTokens in class AbstractCheckTokenTypespublic int[] getRequiredTokens()
AbstractCheckgetRequiredTokens in class AbstractCheckTokenTypespublic boolean isCommentNodesRequired()
AbstractCheckisCommentNodesRequired in class AbstractCheckpublic void visitToken(DetailAST ast)
AbstractCheckvisitToken in class AbstractCheckast - the token to processCopyright © 2001–2020. All rights reserved.