com.puppycrawl.tools.checkstyle.api
public abstract class AbstractFileSetCheck extends AbstractViolationReporter implements FileSetCheck
Method Summary | |
---|---|
void | destroy() |
protected File[] | filter(File[] aFiles)
Determines the set of files this FileSetCheck is interested in.
|
protected void | fireErrors(String aFileName)
Notify all listeners about the errors in a file.
|
String | getCharset() |
protected LocalizedMessages | getMessageCollector()
Returns the collector for violation messages.
|
protected MessageDispatcher | getMessageDispatcher()
A message dispatcher is used to fire violation messages to
interested audit listeners.
|
protected void | log(int aLine, String aKey, Object[] aArgs)
Adds a violation message to the
{@link #getMessageCollector message collector}.
|
protected void | log(int aLineNo, int aColNo, String aKey, Object[] aArgs)
Adds a violation message to the
{@link #getMessageCollector message collector}.
|
void | setCharset(String aCharset)
Sets a named charset. |
void | setFileExtensions(String[] aExtensions)
Sets the file extensions that identify the files that pass the
filter of this FileSetCheck. |
void | setMessageDispatcher(MessageDispatcher aDispatcher) {@inheritDoc} |
See Also: FileSetCheck
This method can be used in the implementation of process()
to filter it's argument list for interesting files.
Parameters: aFiles the candidates for processing
Returns: the subset of aFiles that this FileSetCheck should process
See Also: FileSetCheck
MessageDispatcher.fireErrors()
with
all logged errors and than clears errors' list.Parameters: aFileName the audited file
Returns: the name of the charset
Returns: the collector for localized messages.
Returns: the current MessageDispatcher.
Parameters: aCharset the name of a charset
Throws: UnsupportedEncodingException if aCharset is unsupported.
Parameters: aExtensions the set of file extensions. A missing initial '.' character of an extension is automatically added.