public final class IllegalCatchExtendedCheck
extends com.puppycrawl.tools.checkstyle.api.AbstractCheck
| Modifier and Type | Field and Description |
|---|---|
static String |
MSG_KEY
Warning message key.
|
| Constructor and Description |
|---|
IllegalCatchExtendedCheck() |
| Modifier and Type | Method and Description |
|---|---|
int[] |
getAcceptableTokens() |
int[] |
getDefaultTokens() |
int[] |
getRequiredTokens() |
com.puppycrawl.tools.checkstyle.api.DetailAST |
getThrowAST(com.puppycrawl.tools.checkstyle.api.DetailAST parentAST)
Looking for the keyword "throw" among current (aParentAST) node childs.
|
protected boolean |
isIllegalClassName(String ident)
Checks if given class is illegal.
|
void |
setAllowRethrow(boolean value)
Enable(false) | Disable(true) warnings for "catch" blocks containing
rethrowing an exception.
|
void |
setAllowThrow(boolean value)
Enable(false) | Disable(true) warnings for "catch" blocks containing
throwing an exception.
|
void |
setIllegalClassNames(String... classNames)
Set the list of illegal classes.
|
void |
visitToken(com.puppycrawl.tools.checkstyle.api.DetailAST detailAST) |
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 setIllegalClassNames(String... classNames)
classNames - array of illegal exception classespublic void setAllowThrow(boolean value)
value - Disable warning for throwingpublic void setAllowRethrow(boolean value)
value - Disable warnings for rethrowingpublic 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 detailAST)
visitToken in class com.puppycrawl.tools.checkstyle.api.AbstractCheckpublic com.puppycrawl.tools.checkstyle.api.DetailAST getThrowAST(com.puppycrawl.tools.checkstyle.api.DetailAST parentAST)
parentAST - - the current parent node.protected boolean isIllegalClassName(String ident)
ident - ident to check.Copyright © 2021. All rights reserved.