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| Constructor and Description |
|---|
RedundantThrowsCheck() |
| Modifier and Type | Method and Description |
|---|---|
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, visitTokendestroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getTabWidth, getTokenNames, init, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokensgetCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, log, setId, setSeverityconfigure, contextualize, finishLocalSetup, getConfiguration, setupChildpublic 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()
CheckgetDefaultTokens in class CheckTokenTypesprotected final void processAST(DetailAST aAST)
AbstractTypeAwareCheckprocessAST in class AbstractTypeAwareCheckaAST - the AST to process. Guaranteed to not be PACKAGE_DEF or
IMPORT tokens.protected final void logLoadError(AbstractTypeAwareCheck.Token aIdent)
AbstractTypeAwareChecklogLoadError in class AbstractTypeAwareCheckaIdent - class name for which we can no load class.Copyright © 2001-2012. All Rights Reserved.