edu.cmu.sei.aadl.modelsupport.errorreporting
Class ChainedParseErrorReporter.Factory

java.lang.Object
  extended by edu.cmu.sei.aadl.modelsupport.errorreporting.ChainedParseErrorReporter.Factory
All Implemented Interfaces:
ParseErrorReporterFactory
Enclosing class:
ChainedParseErrorReporter

public static final class ChainedParseErrorReporter.Factory
extends java.lang.Object
implements ParseErrorReporterFactory


Constructor Summary
ChainedParseErrorReporter.Factory(ParseErrorReporterFactory[] factories)
          Create a new factory that creates an analysis error reporter that delegates to error reporters generated by the given list of factories.
 
Method Summary
 ParseErrorReporter getReporterFor(org.eclipse.core.resources.IResource aadlRsrc)
          Obtain an error reporter to use for the AADL text file associated with the given IResource.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ChainedParseErrorReporter.Factory

public ChainedParseErrorReporter.Factory(ParseErrorReporterFactory[] factories)
Create a new factory that creates an analysis error reporter that delegates to error reporters generated by the given list of factories.

Parameters:
factories - The factories to use to generate the delegates. This array is referenced directly. The caller should not keep a reference to it.
Method Detail

getReporterFor

public ParseErrorReporter getReporterFor(org.eclipse.core.resources.IResource aadlRsrc)
Description copied from interface: ParseErrorReporterFactory
Obtain an error reporter to use for the AADL text file associated with the given IResource. This method must never return null. If no factory can be found/created then it must throw a IllegalArgumentException.

The given IResource may be null, but an implementation may throw an IllegalArgumentException if it cannot produce a sensible error reporter for null. An implementation must document its behavoir for null inputs.

(At one point a considerable effort was made to avoid having this interface use IResource, on the grounds that it would complicate using the EMF model stand alone, outside of Eclipse. But there is now so much entanglement between the model and Eclipse, that it doesn't seem worth the effort to attempt the separation here.)

Specified by:
getReporterFor in interface ParseErrorReporterFactory
Parameters:
aadlRsrc - The IResource of the aadl text file for which an error reporter should be generated. May be null, but see above.
Returns:
The error reporter to be used for the file. Must not be null.