java.lang.Object
com.puppycrawl.tools.checkstyle.api.AutomaticBean
com.puppycrawl.tools.checkstyle.api.AbstractViolationReporter
com.puppycrawl.tools.checkstyle.api.AbstractFileSetCheck
com.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.AutomaticBean |
|
|
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 java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
max
private int max
- the maximium number of implementation files,
default is 100.
LimitImplementationFiles
public LimitImplementationFiles()
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.