Package org.codehaus.janino
Class FilterWarningHandler
- java.lang.Object
-
- org.codehaus.janino.FilterWarningHandler
-
- All Implemented Interfaces:
WarningHandler
public class FilterWarningHandler extends java.lang.Object implements WarningHandler
Invokes a delegate iff the handle of the warning matches one or more of a set ofStringPattern
s.
-
-
Constructor Summary
Constructors Constructor Description FilterWarningHandler(StringPattern[] handlePatterns, WarningHandler delegate)
Popular values for thehandlePatterns
parameter areStringPattern.PATTERNS_ALL
andStringPattern.PATTERNS_NONE
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
handleWarning(java.lang.String handle, java.lang.String message, Location location)
May or may not choose to throw aCompileException
.
-
-
-
Constructor Detail
-
FilterWarningHandler
public FilterWarningHandler(StringPattern[] handlePatterns, WarningHandler delegate)
Popular values for thehandlePatterns
parameter areStringPattern.PATTERNS_ALL
andStringPattern.PATTERNS_NONE
.
-
-
Method Detail
-
handleWarning
public void handleWarning(@Nullable java.lang.String handle, java.lang.String message, @Nullable Location location) throws CompileException
Description copied from interface:WarningHandler
May or may not choose to throw aCompileException
.- Specified by:
handleWarning
in interfaceWarningHandler
- Parameters:
handle
- A string describing the category of the warning; used for filtering iff non-null
- Throws:
CompileException
- ThisWarningHandler
wishes to terminate compilation, e.g. because "too many" warnings have been reported
-
-