com.puppycrawl.tools.checkstyle.checks.header

Class RegexpHeaderCheck

Implemented Interfaces:
Configurable, Contextualizable

public class RegexpHeaderCheck
extends AbstractHeaderCheck

Checks the header of the source against a header file that contains a regular expression for each line of the source header.
Authors:
Lars Kühne
o_sukhodolsky

Method Summary

void
beginTree(DetailAST aRootAST)
protected com.puppycrawl.tools.checkstyle.checks.header.HeaderInfo
createHeaderInfo()
protected com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderInfo
getRegexpHeaderInfo()
Provides typesafe access to the subclass specific HeaderInfo.
void
init()
void
setMultiLines(int[] aList)
Set the lines numbers to repeat in the header check.

Methods inherited from class com.puppycrawl.tools.checkstyle.checks.header.AbstractHeaderCheck

createHeaderInfo, finishLocalSetup, getDefaultTokens, getHeaderInfo, getHeaderLines, setHeader, setHeaderFile

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

getId, getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, log, log, log, log, log, setId, setSeverity

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

configure, contextualize, finishLocalSetup, getConfiguration, setupChild

Method Details

beginTree

public void beginTree(DetailAST aRootAST)
Overrides:
beginTree in interface Check

createHeaderInfo

protected com.puppycrawl.tools.checkstyle.checks.header.HeaderInfo createHeaderInfo()
Overrides:
createHeaderInfo in interface AbstractHeaderCheck

getRegexpHeaderInfo

protected com.puppycrawl.tools.checkstyle.checks.header.RegexpHeaderInfo getRegexpHeaderInfo()
Provides typesafe access to the subclass specific HeaderInfo.

init

public void init()
Overrides:
init in interface Check
See Also:
Check.init()

setMultiLines

public void setMultiLines(int[] aList)
Set the lines numbers to repeat in the header check.
Parameters:
aList - comma separated list of line numbers to repeat in header.