com.googlecode.jslint4java.ant
Class PlainResultFormatter

java.lang.Object
  extended by com.googlecode.jslint4java.ant.PlainResultFormatter
All Implemented Interfaces:
ResultFormatter

public class PlainResultFormatter
extends Object
implements ResultFormatter

Output all JSLint errors to the console. Shows the error, the line on which it occurred and a pointer to the character at which it occurred.

If a file is specified, all output will go there. If not, then all output will go to stdout.

Author:
dom

Field Summary
protected  OutputStream out
           
protected  PrintWriter w
           
 
Constructor Summary
PlainResultFormatter()
           
 
Method Summary
 void begin()
          Called at the start of JSLintTask execution.
 void end()
          Called at the end of JSLintTask execution.
 void output(JSLintResult result)
          Emit all issues to the console.
 void setFile(File file)
          Called during initialization.
 void setStdout(OutputStream defaultOutputStream)
          If you want to write to stdout, you can't just use System.out, because we're in the middle of ant task.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

protected OutputStream out

w

protected PrintWriter w
Constructor Detail

PlainResultFormatter

public PlainResultFormatter()
Method Detail

begin

public void begin()
Description copied from interface: ResultFormatter
Called at the start of JSLintTask execution.

Specified by:
begin in interface ResultFormatter

end

public void end()
Description copied from interface: ResultFormatter
Called at the end of JSLintTask execution.

Specified by:
end in interface ResultFormatter

output

public void output(JSLintResult result)
Emit all issues to the console.

Specified by:
output in interface ResultFormatter
Parameters:
result - The details if this JSLint run.

setFile

public void setFile(File file)
Description copied from interface: ResultFormatter
Called during initialization. The file to where output should be written.

Specified by:
setFile in interface ResultFormatter
Parameters:
file - The file to write to.

setStdout

public void setStdout(OutputStream defaultOutputStream)
Description copied from interface: ResultFormatter
If you want to write to stdout, you can't just use System.out, because we're in the middle of ant task. Ensure that a suitable form is passed down instead.

Specified by:
setStdout in interface ResultFormatter


Copyright © 2007-2012. All Rights Reserved.