Class Reporter

java.lang.Object
org.ek9lang.compiler.common.Reporter
Direct Known Subclasses:
CompilerReporter, DependencyNodeFactory, E, PackageResolver

public abstract class Reporter extends Object
Designed to ensure consistent reporting as part of the command line commands and executions.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Reporter(boolean verbose, boolean muteReportedErrors)
    While it may seem strange to want to even be able to mute reported errors, this class can/it used in developer tests and in some cases we don't want to see the actual errors.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    boolean
     
    void
    log(Object message)
    Log a message to stderr if verbose enabled.
    protected abstract String
    Provide the report/log message prefix.
    void
    report(Object message)
    Report a message to stderr.
    void
    setMuteReportedErrors(boolean muteReportedErrors)
     

    Methods inherited from class java.lang.Object

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

    • Reporter

      protected Reporter(boolean verbose, boolean muteReportedErrors)
      While it may seem strange to want to even be able to mute reported errors, this class can/it used in developer tests and in some cases we don't want to see the actual errors.
      Parameters:
      verbose - if true then compiler phase details and other general logging is output.
      muteReportedErrors - if true then even compiler errors are not reported (typically only useful in tests).
  • Method Details

    • messagePrefix

      protected abstract String messagePrefix()
      Provide the report/log message prefix.
    • log

      public void log(Object message)
      Log a message to stderr if verbose enabled.
    • report

      public void report(Object message)
      Report a message to stderr.
    • isVerbose

      public boolean isVerbose()
    • isMuteReportedErrors

      public boolean isMuteReportedErrors()
    • setMuteReportedErrors

      public void setMuteReportedErrors(boolean muteReportedErrors)