Package com.google.javascript.jscomp
Class WhitelistWarningsGuard.WhitelistBuilder
- java.lang.Object
-
- com.google.javascript.jscomp.WhitelistWarningsGuard.WhitelistBuilder
-
- All Implemented Interfaces:
ErrorHandler
- Enclosing class:
- WhitelistWarningsGuard
public class WhitelistWarningsGuard.WhitelistBuilder extends java.lang.Object implements ErrorHandler
Whitelist builder
-
-
Constructor Summary
Constructors Constructor Description WhitelistBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
appendWhitelist(java.io.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(java.lang.String name)
Fill in instructions on how to generate this allowlist.WhitelistWarningsGuard.WhitelistBuilder
setNote(java.lang.String note)
A note to include at the top of the allowlist file.WhitelistWarningsGuard.WhitelistBuilder
setProductName(java.lang.String name)
Fill in your product name to get a fun message!void
writeWhitelist(java.io.File out)
Writes the warnings collected in a format that the WhitelistWarningsGuard can read back later.
-
-
-
Method Detail
-
setProductName
public WhitelistWarningsGuard.WhitelistBuilder setProductName(java.lang.String name)
Fill in your product name to get a fun message!
-
setGeneratorTarget
public WhitelistWarningsGuard.WhitelistBuilder setGeneratorTarget(java.lang.String name)
Fill in instructions on how to generate this allowlist.
-
setNote
public WhitelistWarningsGuard.WhitelistBuilder setNote(java.lang.String note)
A note to include at the top of the allowlist file.
-
report
public void report(CheckLevel level, JSError error)
- Specified by:
report
in interfaceErrorHandler
- Parameters:
level
- the reporting levelerror
- the error to report
-
writeWhitelist
public void writeWhitelist(java.io.File out) throws java.io.IOException
Writes the warnings collected in a format that the WhitelistWarningsGuard can read back later.- Throws:
java.io.IOException
-
appendWhitelist
public void appendWhitelist(java.io.PrintStream out)
Writes the warnings collected in a format that the WhitelistWarningsGuard can read back later.
-
-