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

Quick Search    Search Deep

com.mycompany.checks
Class LimitImplementationFiles  view LimitImplementationFiles download LimitImplementationFiles.java

java.lang.Object
  extended bycom.puppycrawl.tools.checkstyle.api.AutomaticBean
      extended bycom.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
          extended bycom.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
              extended bycom.mycompany.checks.LimitImplementationFiles
All Implemented Interfaces:
com.puppycrawl.tools.checkstyle.api.Configurable, com.puppycrawl.tools.checkstyle.api.Contextualizable, com.puppycrawl.tools.checkstyle.api.FileSetCheck

public class LimitImplementationFiles
extends com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck

An example for a user provided FileSetCheck, checks that the number of files does not excced a certain limit. This Class is provided for educational purposes only, we do not consider it useful to check your production code.


Field Summary
private  int max
          the maximium number of implementation files, default is 100.
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
 
Fields inherited from class com.puppycrawl.tools.checkstyle.api.AutomaticBean
 
Constructor Summary
LimitImplementationFiles()
           
 
Method Summary
 void process(java.io.File[] files)
          Processes a set of files and fires errors to the MessageDispatcher.
 void setMax(int aMax)
          Give user a chance to configure max in the config file.
 
Methods inherited from class com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
destroy, filter, fireErrors, getMessageCollector, getMessageDispatcher, log, log, setFileExtensions, setMessageDispatcher
 
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
 
Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Configurable
configure
 
Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Contextualizable
contextualize
 

Field Detail

max

private int max
the maximium number of implementation files, default is 100.

Constructor Detail

LimitImplementationFiles

public LimitImplementationFiles()
Method Detail

setMax

public void setMax(int aMax)
Give user a chance to configure max in the config file.


process

public void process(java.io.File[] files)
Description copied from interface: com.puppycrawl.tools.checkstyle.api.FileSetCheck
Processes a set of files and fires errors to the MessageDispatcher. The file set to process might contain files that are not interesting to the FileSetCheck. Such files should be ignored, no error message should be fired for them. For example a FileSetCheck that checks java files should ignore html or properties files. Once processiong is done, it is highly recommended to call for the destroy method to close and remove the listeners.