public abstract class AbstractHeaderCheck extends Check
Constructor and Description |
---|
AbstractHeaderCheck() |
Modifier and Type | Method and Description |
---|---|
protected abstract com.puppycrawl.tools.checkstyle.checks.header.HeaderInfo |
createHeaderInfo()
Abstract factory method to create an unconfigured
header info bean.
|
protected void |
finishLocalSetup()
Checks that required args were specified.
|
int[] |
getDefaultTokens()
Returns the default token a check is interested in.
|
protected com.puppycrawl.tools.checkstyle.checks.header.HeaderInfo |
getHeaderInfo()
Return the header info to check against.
|
protected String[] |
getHeaderLines()
Return the header lines to check against.
|
void |
setHeader(String aHeader)
Set the header to check against.
|
void |
setHeaderFile(String aFileName)
Set the header file to check against.
|
beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken
getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, setId, setSeverity
configure, contextualize, getConfiguration, setupChild
protected String[] getHeaderLines()
protected abstract com.puppycrawl.tools.checkstyle.checks.header.HeaderInfo createHeaderInfo()
protected com.puppycrawl.tools.checkstyle.checks.header.HeaderInfo getHeaderInfo()
public void setHeaderFile(String aFileName) throws org.apache.commons.beanutils.ConversionException
aFileName
- the file that contains the header to check against.org.apache.commons.beanutils.ConversionException
- if the file cannot be loadedpublic void setHeader(String aHeader)
aHeader
- header content to check against.org.apache.commons.beanutils.ConversionException
- if the header cannot be interpretedprotected final void finishLocalSetup() throws CheckstyleException
finishLocalSetup
in class AutomaticBean
CheckstyleException
- if there is a configuration error.AutomaticBean.finishLocalSetup()
public final int[] getDefaultTokens()
getDefaultTokens
in class Check
TokenTypes