polyglot.main
Class Report

java.lang.Object
  extended by polyglot.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 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 final 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 final java.util.Stack should_report
A collection of string names of topics which we should always check if we should report.


reportTopics

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


cfg

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

See Also:
Constant Field Values

context

public static final java.lang.String context
See Also:
Constant Field Values

dataflow

public static final java.lang.String dataflow
See Also:
Constant Field Values

errors

public static final java.lang.String errors
See Also:
Constant Field Values

frontend

public static final java.lang.String frontend
See Also:
Constant Field Values

imports

public static final java.lang.String imports
See Also:
Constant Field Values

loader

public static final java.lang.String loader
See Also:
Constant Field Values

resolver

public static final java.lang.String resolver
See Also:
Constant Field Values

serialize

public static final java.lang.String serialize
See Also:
Constant Field Values

time

public static final java.lang.String time
See Also:
Constant Field Values

types

public static final java.lang.String types
See Also:
Constant Field Values

visit

public static final java.lang.String visit
See Also:
Constant Field Values

verbose

public static final java.lang.String verbose
See Also:
Constant Field Values

debug

public static final java.lang.String debug
See Also:
Constant Field Values
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.