com.puppycrawl.tools.checkstyle.checks.header

Class RegexpHeaderCheck

public class RegexpHeaderCheck extends AbstractHeaderCheck

Checks the header of the source against a header file that contains a {@link java.util.regex.Pattern regular expression} for each line of the source header.

Author: Lars Kühne o_sukhodolsky

Method Summary
voidbeginTree(DetailAST aRootAST)
{@inheritDoc}
voidsetHeader(String aHeader)
Set the header to check against.
voidsetHeaderFile(String aFileName)
Sets the file that contains the header to check against.
voidsetMultiLines(int[] aList)
Set the lines numbers to repeat in the header check.

Method Detail

beginTree

public void beginTree(DetailAST aRootAST)
{@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: org.apache.commons.beanutils.ConversionException if the header cannot be loaded or one line is not a regexp.

setHeaderFile

public void setHeaderFile(String aFileName)
Sets the file that contains the header to check against.

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

Throws: org.apache.commons.beanutils.ConversionException if the file cannot be loaded or one line is not a regexp.

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.