Class WarningErrorReporter

  • All Implemented Interfaces:
    org.mozilla.javascript.ErrorReporter

    public final class WarningErrorReporter
    extends java.lang.Object
    implements org.mozilla.javascript.ErrorReporter
    An error reporter that displays warnings.
    Author:
    Chris Jennings
    • Constructor Summary

      Constructors 
      Constructor Description
      WarningErrorReporter​(org.mozilla.javascript.ErrorReporter parent)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean acceptError​(java.lang.String message, boolean warning)
      Returns whether an error should be considered a true error, or filtered out.
      void error​(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)  
      static WarningErrorReporter getShared​(org.mozilla.javascript.ErrorReporter parent)  
      org.mozilla.javascript.EvaluatorException runtimeError​(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)  
      void warning​(java.lang.String message, java.lang.String sourceName, int line, java.lang.String lineSource, int lineOffset)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WarningErrorReporter

        public WarningErrorReporter​(org.mozilla.javascript.ErrorReporter parent)
    • Method Detail

      • getShared

        public static WarningErrorReporter getShared​(org.mozilla.javascript.ErrorReporter parent)
      • warning

        public void warning​(java.lang.String message,
                            java.lang.String sourceName,
                            int line,
                            java.lang.String lineSource,
                            int lineOffset)
        Specified by:
        warning in interface org.mozilla.javascript.ErrorReporter
      • error

        public void error​(java.lang.String message,
                          java.lang.String sourceName,
                          int line,
                          java.lang.String lineSource,
                          int lineOffset)
        Specified by:
        error in interface org.mozilla.javascript.ErrorReporter
      • runtimeError

        public org.mozilla.javascript.EvaluatorException runtimeError​(java.lang.String message,
                                                                      java.lang.String sourceName,
                                                                      int line,
                                                                      java.lang.String lineSource,
                                                                      int lineOffset)
        Specified by:
        runtimeError in interface org.mozilla.javascript.ErrorReporter
      • acceptError

        public static boolean acceptError​(java.lang.String message,
                                          boolean warning)
        Returns whether an error should be considered a true error, or filtered out.
        Parameters:
        message - the error message
        warning - true if the error is a warning
        Returns:
        true if the error should be ignored