com.google.gwt.user.rebind.rpc
Class ProblemReport

java.lang.Object
  extended by com.google.gwt.user.rebind.rpc.ProblemReport

public class ProblemReport
extends java.lang.Object

A collection of reported problems; these are accumulated during the SerializableTypeOracleBuilder's isSerializable analysis, and what to do about the problems is decided only later.


Nested Class Summary
static class ProblemReport.Priority
          Priority of problems.
static class ProblemReport.Problem
          An individual report, which may require multiple entries (expressed as logs under a branchpoint), but relates to an individual issue.
 
Constructor Summary
ProblemReport()
          Creates a new, empty, context-less ProblemReport.
 
Method Summary
 ProblemReport.Problem add(JClassType type, java.lang.String message, ProblemReport.Priority priority, java.lang.String... extraLines)
          Adds a problem for a given type.
 java.lang.String getWorstMessageForType(JClassType type)
           
 boolean hasFatalProblems()
          Were any problems reported as "fatal"?
 void report(TreeLogger logger, TreeLogger.Type problemLevel, TreeLogger.Type auxLevel)
          Reports all problems to the logger supplied, at the log level supplied.
 void reportFatalProblems(TreeLogger logger, TreeLogger.Type level)
          Reports only urgent problems to the logger supplied, at the log level supplied.
 void setContextType(JClassType newContext)
          Sets the context type currently being analyzed.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProblemReport

public ProblemReport()
Creates a new, empty, context-less ProblemReport.

Method Detail

add

public ProblemReport.Problem add(JClassType type,
                                 java.lang.String message,
                                 ProblemReport.Priority priority,
                                 java.lang.String... extraLines)
Adds a problem for a given type. This also sorts the problems into collections by priority.

Parameters:
type - the problematic type
message - the description of the problem
priority - priority of the problem.
extraLines - additional continuation lines for the message, usually for additional explanations.

getWorstMessageForType

public java.lang.String getWorstMessageForType(JClassType type)

hasFatalProblems

public boolean hasFatalProblems()
Were any problems reported as "fatal"?


report

public void report(TreeLogger logger,
                   TreeLogger.Type problemLevel,
                   TreeLogger.Type auxLevel)
Reports all problems to the logger supplied, at the log level supplied. The problems are assured of being reported in lexographic order of type names.

Parameters:
logger - logger to receive problem reports
problemLevel - severity level at which to report problems.
auxLevel - severity level at which to report any auxiliary messages.

reportFatalProblems

public void reportFatalProblems(TreeLogger logger,
                                TreeLogger.Type level)
Reports only urgent problems to the logger supplied, at the log level supplied. The problems are assured of being reported in lexographic order of type names.

Parameters:
logger - logger to receive problem reports
level - severity level at which to report problems.

setContextType

public void setContextType(JClassType newContext)
Sets the context type currently being analyzed. Problems found will include reference to this context, until reset with another call to this method. Context may be cancelled with a null value here.

Parameters:
newContext - the type under analysis