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

java.lang.Object
  extended by edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractErrorReporter
      extended by edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractParseErrorReporter
All Implemented Interfaces:
ErrorReporter, ParseErrorReporter
Direct Known Subclasses:
ChainedParseErrorReporter, LogParseErrorReporter, MarkerParseErrorReporter, NullParseErrorReporter, QueuingParserErrorReporter, WriterParseErrorReporter

public abstract class AbstractParseErrorReporter
extends AbstractErrorReporter
implements ParseErrorReporter

Base implementation that insures messages counts are updated. Delegates the actual reporting functionality to the abstract methods errorImpl(String, int, String), warning(String, int, String), and infoImpl(String, int, String).

Author:
aarong

Constructor Summary
protected AbstractParseErrorReporter()
           
 
Method Summary
 void error(LocationReference loc, java.lang.String message)
          Report an error.
 void error(java.lang.String filename, int line, java.lang.String message)
          Report an error.
protected abstract  void errorImpl(java.lang.String filename, int line, java.lang.String message)
           
 void info(LocationReference loc, java.lang.String message)
          Report information about an AADL text file.
 void info(java.lang.String filename, int line, java.lang.String message)
          Report information about an AADL text file..
protected abstract  void infoImpl(java.lang.String filename, int line, java.lang.String message)
           
 void warning(LocationReference loc, java.lang.String message)
          Report a warning about an AADL text file.
 void warning(java.lang.String filename, int line, java.lang.String message)
          Report a warning about an AADL text file..
protected abstract  void warningImpl(java.lang.String filename, int line, java.lang.String message)
           
 
Methods inherited from class edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractErrorReporter
deleteMessages, deleteMessagesImpl, 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
 

Constructor Detail

AbstractParseErrorReporter

protected AbstractParseErrorReporter()
Method Detail

error

public final void error(LocationReference loc,
                        java.lang.String message)
Description copied from interface: ParseErrorReporter
Report an error.

Specified by:
error in interface ParseErrorReporter
Parameters:
loc - The location on which the warning is located.
message - the error message

error

public final void error(java.lang.String filename,
                        int line,
                        java.lang.String message)
Description copied from interface: ParseErrorReporter
Report an error.

Specified by:
error in interface ParseErrorReporter
Parameters:
filename - The file in which the error is located.
line - The line on which the error occured.
message - the error message

errorImpl

protected abstract void errorImpl(java.lang.String filename,
                                  int line,
                                  java.lang.String message)

warning

public final void warning(LocationReference loc,
                          java.lang.String message)
Description copied from interface: ParseErrorReporter
Report a warning about an AADL text file.

Specified by:
warning in interface ParseErrorReporter
Parameters:
loc - The location on which the warning is located.
message - the warning message

warning

public final void warning(java.lang.String filename,
                          int line,
                          java.lang.String message)
Description copied from interface: ParseErrorReporter
Report a warning about an AADL text file..

Specified by:
warning in interface ParseErrorReporter
Parameters:
filename - The file in which the warning is located.
line - The line on which the warning is located.
message - the warning message

warningImpl

protected abstract void warningImpl(java.lang.String filename,
                                    int line,
                                    java.lang.String message)

info

public final void info(LocationReference loc,
                       java.lang.String message)
Description copied from interface: ParseErrorReporter
Report information about an AADL text file.

Specified by:
info in interface ParseErrorReporter
Parameters:
loc - The location on which the information is located.
message - the information message

info

public final void info(java.lang.String filename,
                       int line,
                       java.lang.String message)
Description copied from interface: ParseErrorReporter
Report information about an AADL text file..

Specified by:
info in interface ParseErrorReporter
Parameters:
filename - The file in which the information is located.
line - The line on which the information is located.
message - the information message

infoImpl

protected abstract void infoImpl(java.lang.String filename,
                                 int line,
                                 java.lang.String message)