public class RedundantThrowsCheck extends AbstractTypeAwareCheck
An example of how to configure the check is:
<module name="RedundantThrows"> <property name="allowUnchecked" value="true"/> <property name="allowSubclasses" value="true"/> </module>
AbstractTypeAwareCheck.ClassInfo, AbstractTypeAwareCheck.Token
DEFAULT_ERROR_SCORE, DEFAULT_INFO_SCORE, DEFAULT_WARNING_SCORE, mScoring, mViolationSize
コンストラクタと説明 |
---|
RedundantThrowsCheck() |
修飾子とタイプ | メソッドと説明 |
---|---|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
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 |
setAllowSubclasses(boolean aAllowSubclasses)
Getter for allowSubclasses property.
|
void |
setAllowUnchecked(boolean aAllowUnchecked)
Getter for allowUnchecked property.
|
beginTree, createClassInfo, findClassAlias, getCurrentClassName, getRequiredTokens, isSubclass, isUnchecked, leaveAST, leaveToken, logLoadErrorImpl, resolveClass, setLogLoadErrors, setSuppressLoadErrors, tryLoadClass, visitToken
destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getTabWidth, getTokenNames, init, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens
calculateScore, getCustomMessages, getErrorScore, getId, getInfoScore, getMessageBundle, getScore, getScoring, getSeverity, getSeverityLevel, getWarningScore, log, setErrorScore, setId, setInfoScore, setScore, setScoring, setSeverity, setWarningScore
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
public void setAllowUnchecked(boolean aAllowUnchecked)
aAllowUnchecked
- whether unchecked excpetions in throws
are allowed or notpublic void setAllowSubclasses(boolean aAllowSubclasses)
aAllowSubclasses
- whether subclass of another declared
exception is allowed in throws clausepublic int[] getDefaultTokens()
Check
getDefaultTokens
クラス内 Check
TokenTypes
protected final void processAST(DetailAST aAST)
AbstractTypeAwareCheck
processAST
クラス内 AbstractTypeAwareCheck
aAST
- the AST to process. Guaranteed to not be PACKAGE_DEF or
IMPORT tokens.protected final void logLoadError(AbstractTypeAwareCheck.Token aIdent)
AbstractTypeAwareCheck
logLoadError
クラス内 AbstractTypeAwareCheck
aIdent
- class name for which we can no load class.Copyright © 2001-2013. All Rights Reserved.