com.puppycrawl.tools.checkstyle.checks

Class AbstractFormatCheck

public abstract class AbstractFormatCheck extends Check

Abstract class for checks that verify strings using a {@link java.util.regex.Pattern regular expression}. It provides support for setting the regular expression using the property name format.

Version: 1.0

Author: Oliver Burn

Constructor Summary
AbstractFormatCheck(String aDefaultFormat)
Creates a new AbstractFormatCheck instance.
Method Summary
StringgetFormat()
PatterngetRegexp()
voidsetFormat(String aFormat)
Set the format to the specified regular expression.

Constructor Detail

AbstractFormatCheck

public AbstractFormatCheck(String aDefaultFormat)
Creates a new AbstractFormatCheck instance.

Parameters: aDefaultFormat default format

Throws: ConversionException unable to parse aDefaultFormat

Method Detail

getFormat

public String getFormat()

Returns: the regexp format

getRegexp

public Pattern getRegexp()

Returns: the regexp to match against

setFormat

public void setFormat(String aFormat)
Set the format to the specified regular expression.

Parameters: aFormat a String value

Throws: ConversionException unable to parse aFormat