com.puppycrawl.tools.checkstyle.checks

Class AbstractHeaderCheck

Implemented Interfaces:
Configurable, Contextualizable
Known Direct Subclasses:
HeaderCheck, RegexpHeaderCheck

public abstract class AbstractHeaderCheck
extends Check

Abstract super class for header checks. Provides support for headerFile property.

Author:
o_sukhosolsky

Method Summary

protected void
finishLocalSetup()
Checks that required args were specified.
int[]
getDefaultTokens()
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.

Methods inherited from class com.puppycrawl.tools.checkstyle.api.Check

beginTree, destroy, finishTree, getAcceptableTokens, getClassLoader, getDefaultTokens, getFileContents, getLines, getRequiredTokens, getTabWidth, getTokenNames, init, leaveToken, log, log, setClassLoader, setFileContents, setMessages, setTabWidth, setTokens, visitToken

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter

getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setSeverity

Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Method Details

finishLocalSetup

protected final void finishLocalSetup()
            throws CheckstyleException
Checks that required args were specified.
Overrides:
finishLocalSetup in interface AutomaticBean

See Also:
AutomaticBean.finishLocalSetup()


getDefaultTokens

public final int[] getDefaultTokens()
Overrides:
getDefaultTokens in interface Check


getHeaderLines

protected String[] getHeaderLines()
Return the header lines to check against.

Returns:
the header lines to check against.


setHeader

public void setHeader(String aHeader)
Set the header to check against. Individual lines in the header must be separated by '\n' characters.

Parameters:
aHeader - header content to check against.


setHeaderFile

public void setHeaderFile(String aFileName)
            throws ConversionException
Set the header file to check against.

Parameters:
aFileName - the file that contains the header to check against.