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

java.lang.Object
  extended by edu.cmu.sei.aadl.modelsupport.errorreporting.AbstractInternalErrorReporter
All Implemented Interfaces:
InternalErrorReporter
Direct Known Subclasses:
LogInternalErrorReporter, NullInternalErrorReporter, WriterInternalErrorReporter

public abstract class AbstractInternalErrorReporter
extends java.lang.Object
implements InternalErrorReporter

Abstract implementation of edu.cmu.sei.aadl.model.pluginsupport.InternalErrorReporter that manages the error count. The methods internalError(Exception) and internalError(String) increment the error count and then delegate to the abstract methods internalErrorImpl(Exception) and internalErrorImpl(String)}, respectively.

Author:
aarong

Constructor Summary
AbstractInternalErrorReporter()
           
 
Method Summary
 int getNumInternalErrors()
          Get the number of internal errors reported with this error manager since it was created.
 void internalError(java.lang.Exception e)
          Report an error in the operation of the client task itself.
 void internalError(java.lang.String message)
          Report an error in the operation of the client task itself.
abstract  void internalErrorImpl(java.lang.Exception e)
           
abstract  void internalErrorImpl(java.lang.String message)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractInternalErrorReporter

public AbstractInternalErrorReporter()
Method Detail

internalError

public final void internalError(java.lang.String message)
Description copied from interface: InternalErrorReporter
Report an error in the operation of the client task itself.

Specified by:
internalError in interface InternalErrorReporter
Parameters:
message - The error message.

internalError

public void internalError(java.lang.Exception e)
Description copied from interface: InternalErrorReporter
Report an error in the operation of the client task itself.

Specified by:
internalError in interface InternalErrorReporter
Parameters:
e - The exception that caused the error.

getNumInternalErrors

public final int getNumInternalErrors()
Description copied from interface: InternalErrorReporter
Get the number of internal errors reported with this error manager since it was created. Currently there is no way to clear the count of internal errors because this can be done by simply creating a new InternalErrorReporter.

Specified by:
getNumInternalErrors in interface InternalErrorReporter

internalErrorImpl

public abstract void internalErrorImpl(java.lang.String message)

internalErrorImpl

public abstract void internalErrorImpl(java.lang.Exception e)