com.puppycrawl.tools.checkstyle
public class Checker extends AutomaticBean implements MessageDispatcher
Constructor Summary | |
---|---|
Checker()
Creates a new Checker instance.
|
Method Summary | |
---|---|
void | addFileSetCheck(FileSetCheck aFileSetCheck)
Adds a FileSetCheck to the list of FileSetChecks
that is executed in process(). |
void | addFilter(Filter aFilter)
Adds a filter to the end of the audit event filter chain. |
void | addListener(AuditListener aListener)
Add the listener that will be used to receive events from the audit. |
void | destroy() Cleans up the object. |
void | finishLocalSetup() {@inheritDoc} |
protected void | fireAuditFinished() notify all listeners about the audit end |
protected void | fireAuditStarted() notify all listeners about the audit start |
void | fireErrors(String aFileName, LocalizedMessage[] aErrors)
notify all listeners about the errors in a file.
|
void | fireFileFinished(String aFileName)
Notify all listeners about the end of a file audit.
|
void | fireFileStarted(String aFileName)
Notify all listeners about the beginning of a file audit.
|
String | getBasedir() |
String | normalize(String aPath)
"normalize" the given absolute path.
|
int | process(File[] aFiles)
Processes a set of files with all FileSetChecks.
|
void | removeFilter(Filter aFilter)
Removes filter. |
void | removeListener(AuditListener aListener)
Removes a given listener. |
void | setBasedir(String aBasedir) |
void | setClassloader(ClassLoader aLoader)
Sets the classloader that is used to contextualize filesetchecks.
|
void | setLocaleCountry(String aLocaleCountry) |
void | setLocaleLanguage(String aLocaleLanguage) |
void | setModuleFactory(ModuleFactory aModuleFactory)
Sets the factory for creating submodules.
|
void | setSeverity(String aSeverity)
Sets the severity level. |
protected void | setupChild(Configuration aChildConf)
Instantiates, configures and registers a child AbstractFilter
or FileSetCheck
that is specified in the provided configuration. |
Checker
instance.
The instance needs to be contextualized and configured.
Throws: CheckstyleException if an error occurs
Parameters: aFileSetCheck the additional FileSetCheck
Parameters: aFilter the additional filter
Parameters: aListener the nosy thing
Parameters: aFileName the audited file aErrors the audit errors from the file
Parameters: aFileName the audited file
Parameters: aFileName the file to be audited
Returns: the base directory property used in unit-test.
This includes:
Parameters: aPath a path for "normalizing"
Returns: "normalized" file name
Throws: java.lang.NullPointerException if the file path is equal to null.
Parameters: aFiles the list of files to be audited.
Returns: the total number of errors found
See Also: destroy
Parameters: aFilter filter to remove.
Parameters: aListener a listener to remove
Parameters: aBasedir the base directory to strip off in filenames
Parameters: aLoader the new classloader
Parameters: aLocaleCountry the country to report messages *
Parameters: aLocaleLanguage the language to report messages *
Parameters: aModuleFactory the factory for creating FileSetChecks
SeverityLevel
class.
Parameters: aSeverity The new severity level
See Also: SeverityLevel
Parameters: aChildConf {@inheritDoc}
Throws: CheckstyleException {@inheritDoc}
See Also: AutomaticBean