edu.cmu.sei.aadl.modelsupport.errorreporting
Class QueuingAnalysisErrorReporter

java.lang.Object
  extended by edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractErrorReporter
      extended by edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractAnalysisErrorReporter
          extended by edu.cmu.sei.aadl.modelsupport.errorreporting.QueuingAnalysisErrorReporter
All Implemented Interfaces:
AnalysisErrorReporter, ErrorReporter

public final class QueuingAnalysisErrorReporter
extends AbstractAnalysisErrorReporter

An implementation of edu.cmu.sei.aadl.model.pluginsupport.ParseErrorReporter that reports errors by storing them in a queue that can be retreived by calling getErrors().

Messages are stored as QueuingAnalysisErrorReporter.Message objects.

Author:
aarong

Nested Class Summary
static class QueuingAnalysisErrorReporter.Message
          Record of a reported error message/warning.
 
Field Summary
static java.lang.String ERROR
           
static edu.cmu.sei.aadl.modelsupport.errorreporting.QueuingAnalysisErrorReporter.Factory factory
          Singleton factory reference.
static java.lang.String INFO
           
static java.lang.String WARNING
           
 
Fields inherited from class edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractAnalysisErrorReporter
resource
 
Constructor Summary
QueuingAnalysisErrorReporter(org.eclipse.emf.ecore.resource.Resource rsrc)
           
 
Method Summary
protected  void deleteMessagesImpl()
           
protected  void errorImpl(Element where, java.lang.String message, java.lang.String[] attrs, java.lang.Object[] values)
          Actual implementation of the error method.
 java.util.List<QueuingAnalysisErrorReporter.Message> getErrors()
          Get the errors.
protected  void infoImpl(Element where, java.lang.String message, java.lang.String[] attrs, java.lang.Object[] values)
          Actual implementation of the info method.
protected  void warningImpl(Element where, java.lang.String message, java.lang.String[] attrs, java.lang.Object[] values)
          Actual implementation of the warning method.
 
Methods inherited from class edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractAnalysisErrorReporter
error, info, warning
 
Methods inherited from class edu.cmu.sei.aadl.modelsupport.errorreporting.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.modelsupport.errorreporting.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.modelsupport.errorreporting.QueuingAnalysisErrorReporter.Factory factory
Singleton factory reference.

Constructor Detail

QueuingAnalysisErrorReporter

public QueuingAnalysisErrorReporter(org.eclipse.emf.ecore.resource.Resource rsrc)
Method Detail

errorImpl

protected void errorImpl(Element where,
                         java.lang.String message,
                         java.lang.String[] attrs,
                         java.lang.Object[] values)
Description copied from class: AbstractAnalysisErrorReporter
Actual implementation of the error method. It is guaranteed that

warningImpl

protected void warningImpl(Element where,
                           java.lang.String message,
                           java.lang.String[] attrs,
                           java.lang.Object[] values)
Description copied from class: AbstractAnalysisErrorReporter
Actual implementation of the warning method. It is guaranteed that

infoImpl

protected void infoImpl(Element where,
                        java.lang.String message,
                        java.lang.String[] attrs,
                        java.lang.Object[] values)
Description copied from class: AbstractAnalysisErrorReporter
Actual implementation of the info method. It is guaranteed that

deleteMessagesImpl

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

getErrors

public java.util.List<QueuingAnalysisErrorReporter.Message> getErrors()
Get the errors.

Returns:
A List of QueuingAnalysisErrorReporter.Message objects.