com.puppycrawl.tools.checkstyle.checks.header

Class CrossLanguageRegexpHeaderCheck

public final class CrossLanguageRegexpHeaderCheck extends AbstractFileSetCheck

A FileSetCheck similar to RegexpHeaderCheck, but works for all text files, not just java code.

Author: lk

Constructor Summary
CrossLanguageRegexpHeaderCheck()
Creates a new instance and initializes the file extentions to the default value, which represents most of the typical text files that require a copyright header.
Method Summary
protected voidfinishLocalSetup()
Checks that required args were specified.
voidprocess(File[] aFiles)
voidsetHeader(String aHeader)
Set the header to check against.
voidsetHeaderFile(String aFileName)
Set the header file to check against.
voidsetMultiLines(int[] aList)
Set the lines numbers to repeat in the header check.

Constructor Detail

CrossLanguageRegexpHeaderCheck

public CrossLanguageRegexpHeaderCheck()
Creates a new instance and initializes the file extentions to the default value, which represents most of the typical text files that require a copyright header.

Method Detail

finishLocalSetup

protected void finishLocalSetup()
Checks that required args were specified.

Throws: CheckstyleException {@inheritDoc }

See Also: AutomaticBean

process

public void process(File[] aFiles)
{@inheritDoc }

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.

Throws: ConversionException if the header cannot be interpreted

setHeaderFile

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

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

Throws: ConversionException if the file cannot be loaded

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.