org.quattor.pan
Class CompilerResults

java.lang.Object
  extended by org.quattor.pan.CompilerResults

public class CompilerResults
extends java.lang.Object

Encapsulates the statistics and exceptions (or errors) from a compilation.

Author:
loomis

Constructor Summary
CompilerResults(CompilerStatistics stats, java.util.Set<java.lang.Throwable> errors)
          Create an object which contains the results of a compilation: the statistics and the list of exceptions.
 
Method Summary
 java.lang.String formatErrors()
          Format the exceptions thrown during the compilation process.
 java.lang.String formatStats()
          Format a summary of the compilation statistics and return the summary.
 java.util.Set<java.lang.Throwable> getErrors()
          Return a list containing all of the errors and exceptions thrown during processing.
 boolean print(boolean verbose)
          Prints out the formatted results.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CompilerResults

public CompilerResults(CompilerStatistics stats,
                       java.util.Set<java.lang.Throwable> errors)
Create an object which contains the results of a compilation: the statistics and the list of exceptions.

Parameters:
stats - Statistics for the compilation (may not be null)
errors - Exceptions or errors thrown during the compilation (may be null if none were thrown)
Throws:
java.lang.IllegalArgumentException - if stats is null
Method Detail

print

public boolean print(boolean verbose)
Prints out the formatted results. Errors are printed to the standard error stream and the summary (if requested) on standard output.

Parameters:
results -

formatErrors

public java.lang.String formatErrors()
Format the exceptions thrown during the compilation process. A null value will be returned if no exceptions were thrown.

Returns:
String containing exceptions thrown during execution or null if none were thrown

formatStats

public java.lang.String formatStats()
Format a summary of the compilation statistics and return the summary.

Returns:
String containing compiler statistics

getErrors

public java.util.Set<java.lang.Throwable> getErrors()
Return a list containing all of the errors and exceptions thrown during processing.

Returns:
set of throwables (exceptions and errors)


Copyright © 2011 Quattor. All Rights Reserved.