com.puppycrawl.tools.checkstyle
Class CheckStyleTask.Formatter

java.lang.Object
  |
  +--com.puppycrawl.tools.checkstyle.CheckStyleTask.Formatter
Enclosing class:
CheckStyleTask

public static class CheckStyleTask.Formatter
extends java.lang.Object

Details about a formatter to be used.

Author:
Oliver Burn

Constructor Summary
CheckStyleTask.Formatter()
           
 
Method Summary
 AuditListener createListener(org.apache.tools.ant.Task aTask)
          Creates a listener for the formatter.
protected  java.io.OutputStream createOutputStream(org.apache.tools.ant.Task aTask)
           
 void setClassname(java.lang.String aTo)
          Set the class name of the formatter.
 void setTofile(java.io.File aTo)
          Set the file to output to.
 void setType(CheckStyleTask.FormatterType aType)
          Set the type of the formatter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckStyleTask.Formatter

public CheckStyleTask.Formatter()
Method Detail

setType

public void setType(CheckStyleTask.FormatterType aType)
Set the type of the formatter.
Parameters:
aType - the type

setClassname

public void setClassname(java.lang.String aTo)
Set the class name of the formatter.
Parameters:
aTo - the formatter class name

setTofile

public void setTofile(java.io.File aTo)
Set the file to output to.
Parameters:
aTo - the file to output to

createListener

public AuditListener createListener(org.apache.tools.ant.Task aTask)
                             throws java.lang.ClassNotFoundException,
                                    java.lang.InstantiationException,
                                    java.lang.IllegalAccessException,
                                    java.io.IOException
Creates a listener for the formatter.
Parameters:
aTask - the task running
Returns:
a listener
Throws:
java.lang.ClassNotFoundException - if an error occurs
java.lang.InstantiationException - if an error occurs
java.lang.IllegalAccessException - if an error occurs
java.io.IOException - if an error occurs

createOutputStream

protected java.io.OutputStream createOutputStream(org.apache.tools.ant.Task aTask)
                                           throws java.io.IOException
Parameters:
aTask - the task to possibly log to
Returns:
an output stream to log with
Throws:
java.io.IOException - if an error occurs