com.puppycrawl.tools.checkstyle.checks

Class AbstractHeaderCheck

public abstract class AbstractHeaderCheck extends Check

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

Author: o_sukhosolsky

Method Summary
protected voidfinishLocalSetup()
Checks that required args were specified.
int[]getDefaultTokens()
{@inheritDoc}
protected String[]getHeaderLines()
Return the header lines to check against.
voidsetHeader(String aHeader)
Set the header to check against.
voidsetHeaderFile(String aFileName)
Set the header file to check against.

Method Detail

finishLocalSetup

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

Throws: CheckstyleException {@inheritDoc}

See Also: AutomaticBean

getDefaultTokens

public final int[] getDefaultTokens()
{@inheritDoc}

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.

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