Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.puppycrawl.tools.checkstyle.checks
Class AbstractFormatCheck  view AbstractFormatCheck download AbstractFormatCheck.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended bycom.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
          extended bycom.puppycrawl.tools.checkstyle.api.Check
              extended bycom.puppycrawl.tools.checkstyle.checks.AbstractFormatCheck
All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable
Direct Known Subclasses:
AbstractNameCheck, GenericIllegalRegexpCheck, PackageNameCheck, TodoCommentCheck

public abstract class AbstractFormatCheck
extends com.puppycrawl.tools.checkstyle.api.Check

Abstract class for checks that verify strings using a regular expression. It provides support for setting the regular expression using the property name format.

Version:
1.0

Field Summary
private  java.lang.String mFormat
          the format string of the regexp
private  org.apache.regexp.RE mRegexp
          the regexp to match against
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.Check
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
 
Constructor Summary
AbstractFormatCheck(java.lang.String aDefaultFormat)
          Creates a new AbstractFormatCheck instance.
 
Method Summary
 java.lang.String getFormat()
           
 org.apache.regexp.RE getRegexp()
           
 void setFormat(java.lang.String aFormat)
          Set the format to the specified regular expression.
 
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
getMessageBundle, getSeverity, getSeverityLevel, log, log, log, log, log, log, setSeverity
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
configure, contextualize, finishLocalSetup, getConfiguration, setupChild
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mRegexp

private org.apache.regexp.RE mRegexp
the regexp to match against


mFormat

private java.lang.String mFormat
the format string of the regexp

Constructor Detail

AbstractFormatCheck

public AbstractFormatCheck(java.lang.String aDefaultFormat)
                    throws org.apache.commons.beanutils.ConversionException
Creates a new AbstractFormatCheck instance.

Method Detail

setFormat

public void setFormat(java.lang.String aFormat)
               throws org.apache.commons.beanutils.ConversionException
Set the format to the specified regular expression.


getRegexp

public org.apache.regexp.RE getRegexp()

getFormat

public java.lang.String getFormat()