polyglot.main
Class Report

java.lang.Object
  extended bypolyglot.main.Report

public class Report
extends java.lang.Object

Class used for reporting debug messages.


Field Summary
static java.lang.String cfg
          Report topics understood by the base compiler.
static java.lang.String context
           
static java.lang.String dataflow
           
static java.lang.String debug
           
static java.lang.String errors
           
static java.lang.String frontend
           
static java.lang.String imports
           
static java.lang.String loader
           
protected static boolean noReporting
          Indicates if there is no reporting at all.
protected static java.util.Map reportTopics
          The topics that the user has selected to report, mapped to the level they want to report them to.
static java.lang.String resolver
           
static java.lang.String serialize
           
static java.util.Stack should_report
          A collection of string names of topics which we should always check if we should report.
static java.lang.String time
           
static java.util.Collection topics
          A collection of string names of topics which can be used with the -report command-line switch
static java.lang.String types
           
static java.lang.String verbose
           
static java.lang.String visit
           
 
Constructor Summary
Report()
           
 
Method Summary
static void addTopic(java.lang.String topic, int level)
           
protected static int level(java.lang.String name)
           
static void report(int level, java.lang.String message)
          This is the standard way to report debugging information in the compiler.
static boolean should_report(java.util.Collection topics, int level)
          Return whether a message on topics of obscurity level should be reported, based on use of the -report command-line switches given by the user.
static boolean should_report(java.lang.String[] topics, int level)
          Return whether a message on topics of obscurity level should be reported, based on use of the -report command-line switches given by the user.
static boolean should_report(java.lang.String topic, int level)
          Return whether a message on topic of obscurity level should be reported, based on use of the -report command-line switches given by the user.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

topics

public static java.util.Collection topics
A collection of string names of topics which can be used with the -report command-line switch


should_report

public static java.util.Stack should_report
A collection of string names of topics which we should always check if we should report.


reportTopics

protected static java.util.Map reportTopics
The topics that the user has selected to report, mapped to the level they want to report them to.


noReporting

protected static boolean noReporting
Indicates if there is no reporting at all. The normal case is that we do not report anything, so for efficiency reasons, since should_report is called so often, we'll use this flag to bypass a lot of the checking. When the options are processed, this flag should be changed.


cfg

public static java.lang.String cfg
Report topics understood by the base compiler.


context

public static java.lang.String context

dataflow

public static java.lang.String dataflow

errors

public static java.lang.String errors

frontend

public static java.lang.String frontend

imports

public static java.lang.String imports

loader

public static java.lang.String loader

resolver

public static java.lang.String resolver

serialize

public static java.lang.String serialize

time

public static java.lang.String time

types

public static java.lang.String types

visit

public static java.lang.String visit

verbose

public static java.lang.String verbose

debug

public static java.lang.String debug
Constructor Detail

Report

public Report()
Method Detail

should_report

public static boolean should_report(java.lang.String topic,
                                    int level)
Return whether a message on topic of obscurity level should be reported, based on use of the -report command-line switches given by the user.


should_report

public static boolean should_report(java.lang.String[] topics,
                                    int level)
Return whether a message on topics of obscurity level should be reported, based on use of the -report command-line switches given by the user.


should_report

public static boolean should_report(java.util.Collection topics,
                                    int level)
Return whether a message on topics of obscurity level should be reported, based on use of the -report command-line switches given by the user.


addTopic

public static void addTopic(java.lang.String topic,
                            int level)

level

protected static int level(java.lang.String name)

report

public static void report(int level,
                          java.lang.String message)
This is the standard way to report debugging information in the compiler. It reports a message of the specified level (which controls the presentation of the message. To test whether such message should be reported, use "should_report" NOTE: This is a change of spec from earlier versions of Report.