Class FilterWarningHandler
java.lang.Object
org.codehaus.janino.FilterWarningHandler
- All Implemented Interfaces:
WarningHandler
Invokes a delegate iff the handle of the warning matches one or more of a set of
StringPatterns.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilterWarningHandler(StringPattern[] handlePatterns, WarningHandler delegate) Popular values for thehandlePatternsparameter areStringPattern.PATTERNS_ALLandStringPattern.PATTERNS_NONE. -
Method Summary
Modifier and TypeMethodDescriptionvoidhandleWarning(String handle, String message, Location location) May or may not choose to throw aCompileException.
-
Field Details
-
handlePatterns
-
delegate
-
-
Constructor Details
-
FilterWarningHandler
Popular values for thehandlePatternsparameter areStringPattern.PATTERNS_ALLandStringPattern.PATTERNS_NONE.
-
-
Method Details
-
handleWarning
public void handleWarning(@Nullable String handle, String message, @Nullable Location location) throws CompileException Description copied from interface:WarningHandlerMay or may not choose to throw aCompileException.- Specified by:
handleWarningin interfaceWarningHandler- Parameters:
handle- A string describing the category of the warning; used for filtering iff non-null- Throws:
CompileException- ThisWarningHandlerwishes to terminate compilation, e.g. because "too many" warnings have been reported
-