com.google.javascript.jscomp
Class WhitelistWarningsGuard.WhitelistBuilder

java.lang.Object
  extended by com.google.javascript.jscomp.WhitelistWarningsGuard.WhitelistBuilder
All Implemented Interfaces:
ErrorHandler
Enclosing class:
WhitelistWarningsGuard

public static class WhitelistWarningsGuard.WhitelistBuilder
extends Object
implements ErrorHandler


Constructor Summary
WhitelistWarningsGuard.WhitelistBuilder()
           
 
Method Summary
 void appendWhitelist(PrintStream out)
          Writes the warnings collected in a format that the WhitelistWarningsGuard can read back later.
 void report(CheckLevel level, JSError error)
           
 WhitelistWarningsGuard.WhitelistBuilder setGeneratorTarget(String name)
          Fill in instructions on how to generate this whitelist.
 WhitelistWarningsGuard.WhitelistBuilder setProductName(String name)
          Fill in your product name to get a fun message!
 WhitelistWarningsGuard.WhitelistBuilder setWithLineNumber(boolean line)
          Sets whether line number are recorded in the whitelist.
 void writeWhitelist(File out)
          Writes the warnings collected in a format that the WhitelistWarningsGuard can read back later.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WhitelistWarningsGuard.WhitelistBuilder

public WhitelistWarningsGuard.WhitelistBuilder()
Method Detail

setProductName

public WhitelistWarningsGuard.WhitelistBuilder setProductName(String name)
Fill in your product name to get a fun message!


setGeneratorTarget

public WhitelistWarningsGuard.WhitelistBuilder setGeneratorTarget(String name)
Fill in instructions on how to generate this whitelist.


setWithLineNumber

public WhitelistWarningsGuard.WhitelistBuilder setWithLineNumber(boolean line)
Sets whether line number are recorded in the whitelist. This means that if lines are added below the warning, the warning will need to be fixed or the whitelist will need to be regenerated.


report

public void report(CheckLevel level,
                   JSError error)
Specified by:
report in interface ErrorHandler
Parameters:
level - the reporting level
error - the error to report

writeWhitelist

public void writeWhitelist(File out)
                    throws IOException
Writes the warnings collected in a format that the WhitelistWarningsGuard can read back later.

Throws:
IOException

appendWhitelist

public void appendWhitelist(PrintStream out)
Writes the warnings collected in a format that the WhitelistWarningsGuard can read back later.