public class ForbidAnnotationCheck
extends com.puppycrawl.tools.checkstyle.api.AbstractCheck
<module name="ForbidAnnotation"> <property name="annotationNames" value="XXX"/> <property name="annotationTargets" value="METHOD_DEF,CLASS_DEF"/> </module>
| Modifier and Type | Field and Description |
|---|---|
static String |
MSG_KEY
A key is used to retrieve check message from 'messages.properties' file.
|
| Constructor and Description |
|---|
ForbidAnnotationCheck() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens() |
int[] |
getDefaultTokens() |
int[] |
getRequiredTokens() |
void |
setAnnotationNames(String... names)
Setter for annotationNames.
|
void |
setAnnotationTargets(String... targets)
Getter for annotationNames.
|
void |
visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST annotation) |
beginTree, clearMessages, destroy, finishTree, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, leaveToken, log, log, log, setFileContents, setTabWidth, setTokensfinishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeveritypublic static final String MSG_KEY
public void setAnnotationNames(String... names)
names - - array of annotation's namespublic void setAnnotationTargets(String... targets)
targets - - array of type's namespublic int[] getDefaultTokens()
getDefaultTokens in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic int[] getAcceptableTokens()
getAcceptableTokens in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic int[] getRequiredTokens()
getRequiredTokens in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic void visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST annotation)
visitToken in class com.puppycrawl.tools.checkstyle.api.AbstractCheckCopyright © 2021. All rights reserved.