Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.puppycrawl.tools.checkstyle.api
Interface FileSetCheck

All Superinterfaces:
  Configurable, Contextualizable

All Known Implementing Classes:
  AbstractFileSetCheck, AbstractHeaderCheck, FileLengthCheck, FileTabCharacterCheck, HeaderCheck, JavadocPackageCheck, NewlineAtEndOfFileCheck, RegexpHeaderCheck, RegexpMultilineCheck, RegexpSinglelineCheck, StrictDuplicateCodeCheck, TranslationCheck, TreeWalker

    public interface FileSetCheck

extends Configurable, Contextualizable

Interface for Checking a set of files for some criteria.

Author:
  lkuehne, oliver

Method Summary
`void` | `beginProcessing(String aCharset)` Called when about to be called to process a set of files.
`void` | `destroy()` Cleans up the object.
`void` | `finishProcessing()` Called when all the files have been processed.
`void` | `init()` Initialise the instance.
`TreeSet<LocalizedMessage>` | `process(File aFile, List<String> aLines)` Request to process a file.
`void` | `setMessageDispatcher(MessageDispatcher aDispatcher)` Sets the MessageDispatcher that is used to dispatch error messages to AuditListeners during processing.

Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Configurable
`configure`

Methods inherited from interface com.puppycrawl.tools.checkstyle.api.Contextualizable
`contextualize`

Method Detail

### setMessageDispatcher

    void setMessageDispatcher(MessageDispatcher aDispatcher)

  Sets the MessageDispatcher that is used to dispatch error messages to AuditListeners during processing.

  Parameters:
    `aDispatcher` - the dispatcher

### init

    void init()

  Initialise the instance. This is the time to verify that everything required to perform it job.

### destroy

    void destroy()

  Cleans up the object.

### beginProcessing

    void beginProcessing(String aCharset)

  Called when about to be called to process a set of files.

  Parameters:
    `aCharset` - the character set used to read the files.

### process

    TreeSet<LocalizedMessage> process(File aFile,
                                      List<String> aLines)

  Request to process a file. The implementation should use the supplied contents and not read the contents again. This reduces the amount of file I/O.

  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.

  The method should return the set of messages to be logged.

  Parameters:
    `aFile` - the file to be processed
    `aLines` - an immutable list of the contents of the file.
  Returns:
    the list of messages to be logged.

### finishProcessing

    void finishProcessing()

  Called when all the files have been processed. This is the time to perform any checks that need to be done across a set of files. In this method, the implementation is responsible for the logging of messages.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2011. All Rights Reserved.