edu.cmu.sei.aadl.model.pluginsupport
Class QueuingParserErrorReporter

java.lang.Object
  extended by edu.cmu.sei.aadl.model.pluginsupport.AbstractErrorReporter
      extended by edu.cmu.sei.aadl.model.pluginsupport.AbstractParseErrorReporter
          extended by edu.cmu.sei.aadl.model.pluginsupport.QueuingParserErrorReporter
All Implemented Interfaces:
ErrorReporter, ParseErrorReporter

public final class QueuingParserErrorReporter
extends AbstractParseErrorReporter

An implementation of ParseErrorReporter that reports errors by storing them in a queue that can be retreived by calling getErrors().

Messages are stored as QueuingParserErrorReporter.Message objects.

Author:
aarong

Nested Class Summary
static class QueuingParserErrorReporter.Message
          Record of a reported error message/warning.
 
Field Summary
static java.lang.String ERROR
           
static edu.cmu.sei.aadl.model.pluginsupport.QueuingParserErrorReporter.Factory factory
          Singleton factory reference.
static java.lang.String INFO
           
static java.lang.String WARNING
           
 
Constructor Summary
QueuingParserErrorReporter()
           
 
Method Summary
protected  void deleteMessagesImpl()
           
protected  void errorImpl(java.lang.String filename, int line, java.lang.String message)
           
 java.util.List getErrors()
          Get the errors.
protected  void infoImpl(java.lang.String filename, int line, java.lang.String message)
           
protected  void warningImpl(java.lang.String filename, int line, java.lang.String message)
           
 
Methods inherited from class edu.cmu.sei.aadl.model.pluginsupport.AbstractParseErrorReporter
error, error, info, info, warning, warning
 
Methods inherited from class edu.cmu.sei.aadl.model.pluginsupport.AbstractErrorReporter
deleteMessages, getNumErrors, getNumInfos, getNumMessages, getNumWarnings, incError, incInfo, incWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.cmu.sei.aadl.model.pluginsupport.ErrorReporter
deleteMessages, getNumErrors, getNumInfos, getNumMessages, getNumWarnings
 

Field Detail

ERROR

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

WARNING

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

INFO

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

factory

public static final edu.cmu.sei.aadl.model.pluginsupport.QueuingParserErrorReporter.Factory factory
Singleton factory reference.

Constructor Detail

QueuingParserErrorReporter

public QueuingParserErrorReporter()
Method Detail

errorImpl

protected void errorImpl(java.lang.String filename,
                         int line,
                         java.lang.String message)
Specified by:
errorImpl in class AbstractParseErrorReporter

warningImpl

protected void warningImpl(java.lang.String filename,
                           int line,
                           java.lang.String message)
Specified by:
warningImpl in class AbstractParseErrorReporter

infoImpl

protected void infoImpl(java.lang.String filename,
                        int line,
                        java.lang.String message)
Specified by:
infoImpl in class AbstractParseErrorReporter

deleteMessagesImpl

protected void deleteMessagesImpl()
Specified by:
deleteMessagesImpl in class AbstractErrorReporter

getErrors

public java.util.List getErrors()
Get the errors.

Returns:
A List of QueuingParserErrorReporter.Message objects.