Package com.qulice.checkstyle
Class ProhibitNonFinalClassesCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.AutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- com.qulice.checkstyle.ProhibitNonFinalClassesCheck
-
- All Implemented Interfaces:
Configurable,Contextualizable
public final class ProhibitNonFinalClassesCheck extends AbstractCheck
Checks that classes are declared as final. Doesn't check for classes nested in interfaces or annotations, as they are alwaysfinalthere.An example of how to configure the check is:
<module name="ProhibitNonFinalClassesCheck"/>
- Since:
- 0.19
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
AutomaticBean.OutputStreamOptions
-
-
Constructor Summary
Constructors Constructor Description ProhibitNonFinalClassesCheck()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbeginTree(DetailAST root)int[]getAcceptableTokens()int[]getDefaultTokens()int[]getRequiredTokens()voidleaveToken(DetailAST ast)voidvisitToken(DetailAST ast)-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
clearMessages, destroy, finishTree, getClassLoader, getFileContents, getLine, getLines, getMessages, getTabWidth, getTokenNames, init, isCommentNodesRequired, log, log, log, setClassLoader, setFileContents, setTabWidth, setTokens
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, getConfiguration, setupChild
-
-
-
-
Method Detail
-
getDefaultTokens
public int[] getDefaultTokens()
- Specified by:
getDefaultTokensin classAbstractCheck
-
getAcceptableTokens
public int[] getAcceptableTokens()
- Specified by:
getAcceptableTokensin classAbstractCheck
-
getRequiredTokens
public int[] getRequiredTokens()
- Specified by:
getRequiredTokensin classAbstractCheck
-
beginTree
public void beginTree(DetailAST root)
- Overrides:
beginTreein classAbstractCheck
-
visitToken
public void visitToken(DetailAST ast)
- Overrides:
visitTokenin classAbstractCheck
-
leaveToken
public void leaveToken(DetailAST ast)
- Overrides:
leaveTokenin classAbstractCheck
-
-