Class CheckstyleAntTask.Formatter
java.lang.Object
com.puppycrawl.tools.checkstyle.ant.CheckstyleAntTask.Formatter
- Enclosing class:
 - CheckstyleAntTask
 
Details about a formatter to be used.
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprivate FileThe file to output to.private CheckstyleAntTask.FormatterTypeThe formatter type.private booleanWhether or not to write to the named file. - 
Constructor Summary
Constructors - 
Method Summary
Modifier and TypeMethodDescriptionprivate AuditListenercreateDefaultLogger(org.apache.tools.ant.Task task) Creates default logger.createListener(org.apache.tools.ant.Task task) Creates a listener for the formatter.private AuditListenercreateSarifLogger(org.apache.tools.ant.Task task) Creates Sarif logger.private AuditListenercreateXmlLogger(org.apache.tools.ant.Task task) Creates XML logger.voidSet the file to output to.voidSet the type of the formatter.voidsetUseFile(boolean use) Sets whether or not we write to a file if it is provided. 
- 
Field Details
- 
type
The formatter type. - 
toFile
The file to output to. - 
useFile
Whether or not to write to the named file. 
 - 
 - 
Constructor Details
- 
Formatter
public Formatter() 
 - 
 - 
Method Details
- 
setType
Set the type of the formatter.- Parameters:
 type- the type
 - 
setTofile
Set the file to output to.- Parameters:
 destination- destination the file to output to
 - 
setUseFile
Sets whether or not we write to a file if it is provided.- Parameters:
 use- whether not to use provided file.
 - 
createListener
Creates a listener for the formatter.- Parameters:
 task- the task running- Returns:
 - a listener
 - Throws:
 IOException- if an error occurs
 - 
createSarifLogger
Creates Sarif logger.- Parameters:
 task- the task to possibly log to- Returns:
 - an SarifLogger instance
 - Throws:
 IOException- if an error occurs
 - 
createDefaultLogger
Creates default logger.- Parameters:
 task- the task to possibly log to- Returns:
 - a DefaultLogger instance
 - Throws:
 IOException- if an error occurs
 - 
createXmlLogger
Creates XML logger.- Parameters:
 task- the task to possibly log to- Returns:
 - an XMLLogger instance
 - Throws:
 IOException- if an error occurs
 
 -