mars
Class ErrorList

java.lang.Object
  |
  +--mars.ErrorList

public class ErrorList
extends java.lang.Object

Maintains list of generated error messages, regardless of source (tokenizing, parsing, assembly, execution).


Constructor Summary
ErrorList()
          Constructor for ErrorList
 
Method Summary
 void add(ErrorMessage mess)
          Add new error message to end of list.
 int errorCount()
          Count of number of error messages in list.
 boolean errorsOccurred()
          Determine whether error has occured or not.
 java.lang.String generateErrorAndWarningReport()
          Produce report containing both warnings and errors, warnings first.
 java.lang.String generateErrorReport()
          Produce error report.
 java.lang.String generateWarningReport()
          Produce warning report.
 int warningCount()
          Count of number of warning messages in list.
 boolean warningsOccurred()
          Determine whether warning has occured or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ErrorList

public ErrorList()
Constructor for ErrorList

Method Detail

errorsOccurred

public boolean errorsOccurred()
Determine whether error has occured or not.

Returns:
true if an error has occurred (does not include warnings), false otherwise.

warningsOccurred

public boolean warningsOccurred()
Determine whether warning has occured or not.

Returns:
true if an warning has occurred, false otherwise.

add

public void add(ErrorMessage mess)
Add new error message to end of list.

Parameters:
mess - ErrorMessage object to be added to end of error list.

errorCount

public int errorCount()
Count of number of error messages in list.

Returns:
Number of error messages in list.

warningCount

public int warningCount()
Count of number of warning messages in list.

Returns:
Number of warning messages in list.

generateErrorReport

public java.lang.String generateErrorReport()
Produce error report.

Returns:
String containing report.

generateWarningReport

public java.lang.String generateWarningReport()
Produce warning report.

Returns:
String containing report.

generateErrorAndWarningReport

public java.lang.String generateErrorAndWarningReport()
Produce report containing both warnings and errors, warnings first.

Returns:
String containing report.