edu.cmu.sei.aadl.model.pluginsupport
Class WriterAnalysisErrorReporter
java.lang.Object
edu.cmu.sei.aadl.model.pluginsupport.AbstractErrorReporter
edu.cmu.sei.aadl.model.pluginsupport.AbstractAnalysisErrorReporter
edu.cmu.sei.aadl.model.pluginsupport.WriterAnalysisErrorReporter
- All Implemented Interfaces:
- AnalysisErrorReporter, ErrorReporter
public final class WriterAnalysisErrorReporter
- extends AbstractAnalysisErrorReporter
An implementation of
AnalysisErrorReporter
that outputs
the messages to a Java Writer
. Includes a
prototype reference to a factory that creates
reporters that print to the system out
.
The class defines a nested class
WriterAnalysisErrorReporter.Factory
that implements a factory.
- Author:
- aarong
Constructor Summary |
WriterAnalysisErrorReporter(org.eclipse.emf.ecore.resource.Resource rsrc,
java.io.Writer writer)
Create a new error reporter that writes the error messages to the given
Writer object. |
Method Summary |
protected void |
deleteMessagesImpl()
|
protected void |
errorImpl(AObject where,
java.lang.String message,
java.lang.String[] attrs,
java.lang.Object[] values)
Actual implementation of the error method. |
protected void |
infoImpl(AObject where,
java.lang.String message,
java.lang.String[] attrs,
java.lang.Object[] values)
Actual implementation of the info method. |
protected void |
warningImpl(AObject where,
java.lang.String message,
java.lang.String[] attrs,
java.lang.Object[] values)
Actual implementation of the warning method. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SYSTEM_OUT_FACTORY
public static final WriterAnalysisErrorReporter.Factory SYSTEM_OUT_FACTORY
- Singleton reference to an factory that creates reporters that send the
messages to
System.out
.
WriterAnalysisErrorReporter
public WriterAnalysisErrorReporter(org.eclipse.emf.ecore.resource.Resource rsrc,
java.io.Writer writer)
- Create a new error reporter that writes the error messages to the given
Writer
object. The caller is responsible for providing any
buffering, i.e., the writer will be used as provided and is not further
wrapped.
- Parameters:
writer
- The writer to use.
- Throws:
java.lang.IllegalArgumentException
- Thrown if writer
is null
.
errorImpl
protected void errorImpl(AObject 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(AObject 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(AObject 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
where
is from the resource of the error reporter
attrs
is non-null
values
is non-null
- the lengths of
attrs
and values
are equal
- Specified by:
infoImpl
in class AbstractAnalysisErrorReporter
deleteMessagesImpl
protected void deleteMessagesImpl()
- Specified by:
deleteMessagesImpl
in class AbstractErrorReporter