Class InterfaceTypeParameterNameCheck
- java.lang.Object
-
- com.puppycrawl.tools.checkstyle.api.AutomaticBean
-
- com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
-
- com.puppycrawl.tools.checkstyle.api.AbstractCheck
-
- com.puppycrawl.tools.checkstyle.checks.naming.AbstractNameCheck
-
- com.github.sevntu.checkstyle.checks.naming.InterfaceTypeParameterNameCheck
-
- All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.Configurable
,com.puppycrawl.tools.checkstyle.api.Contextualizable
public class InterfaceTypeParameterNameCheck extends com.puppycrawl.tools.checkstyle.checks.naming.AbstractNameCheck
Checks that interface type parameter names conform to a format specified by the format property. The format is a
regular expression
and defaults to ^[A-Z]$.An example of how to configure the check is:
<module name="InterfaceTypeParameterName"/>
An example of how to configure the check for names that are only a single letter is
<module name="InterfaceTypeParameterName"> <property name="format" value="^[a-zA-Z]$"/> </module>
- Since:
- 1.8.0
- Version:
- 1.0
- Author:
- Dmitry Gridyushko
-
-
Constructor Summary
Constructors Constructor Description InterfaceTypeParameterNameCheck()
Creates a newInterfaceTypeParameterNameCheck
instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int[]
getAcceptableTokens()
int[]
getDefaultTokens()
int[]
getRequiredTokens()
protected boolean
mustCheckName(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
-
Methods inherited from class com.puppycrawl.tools.checkstyle.checks.naming.AbstractNameCheck
setFormat, visitToken
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractCheck
beginTree, clearViolations, destroy, finishTree, getFileContents, getFilePath, getLine, getLineCodePoints, getLines, getTabWidth, getTokenNames, getViolations, init, isCommentNodesRequired, leaveToken, log, log, log, setFileContents, setTabWidth, setTokens
-
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
finishLocalSetup, getCustomMessages, getId, getMessageBundle, getSeverity, getSeverityLevel, setId, setSeverity
-
-
-
-
Method Detail
-
getDefaultTokens
public final int[] getDefaultTokens()
- Specified by:
getDefaultTokens
in classcom.puppycrawl.tools.checkstyle.api.AbstractCheck
-
getAcceptableTokens
public int[] getAcceptableTokens()
- Specified by:
getAcceptableTokens
in classcom.puppycrawl.tools.checkstyle.api.AbstractCheck
-
getRequiredTokens
public int[] getRequiredTokens()
- Specified by:
getRequiredTokens
in classcom.puppycrawl.tools.checkstyle.api.AbstractCheck
-
mustCheckName
protected final boolean mustCheckName(com.puppycrawl.tools.checkstyle.api.DetailAST ast)
- Specified by:
mustCheckName
in classcom.puppycrawl.tools.checkstyle.checks.naming.AbstractNameCheck
-
-