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