edu.cmu.sei.aadl.modelsupport.modeltraversal
Class AadlProcessingSwitch

java.lang.Object
  extended by edu.cmu.sei.aadl.modelsupport.modeltraversal.ForAllElement
      extended by edu.cmu.sei.aadl.modelsupport.modeltraversal.AadlProcessingSwitch
Direct Known Subclasses:
AadlProcessingSwitchWithProgress, CheckInstanceSemanticsSwitch

public abstract class AadlProcessingSwitch
extends ForAllElement

This class implements the traversal over an AADL model and the invoaction of a case method for each of the classes in the AADL Meta model based on the EMF generated doSwitch. It handles the fact that the AADL Meta model consists of multiple Meta model packages, thus, multiple switches

Author:
phf

Field Summary
protected  Aadl2Switch<java.lang.String> aadl2Switch
           
static java.lang.String copyright
           
static java.lang.String DONE
           
static AadlProcessingSwitch INSTANCE
           
protected  InstanceSwitch<java.lang.String> instanceSwitch
           
static java.lang.String NOT_DONE
           
 
Fields inherited from class edu.cmu.sei.aadl.modelsupport.modeltraversal.ForAllElement
DEFAULT_DEFAULT_TRAVERSAL, NO_DEFAULT, PROCESS_BOTTOM_UP_COMPONENT_IMPL, PROCESS_POST_ORDER_ALL, PROCESS_PRE_ORDER_ALL, PROCESS_TOP_DOWN_COMPONENT_CLASSIFIER, PROCESS_TOP_DOWN_COMPONENT_IMPL, resultList
 
Constructor Summary
AadlProcessingSwitch()
          Create an Aadl switch that uses AnalysisErrorReporterManager.NULL_ERROR_MANANGER.
AadlProcessingSwitch(AnalysisErrorReporterManager errMgr)
          Create an Aadl switch that delages to the given error manager.
AadlProcessingSwitch(int defTraversal)
           
AadlProcessingSwitch(int defTraversal, AnalysisErrorReporterManager errMgr)
           
 
Method Summary
 Aadl2Switch<java.lang.String> getAadl2Switch()
          get Aadl2Switch
 InstanceSwitch<java.lang.String> getInstanceSwitch()
          get InstanceSwitch
protected abstract  void initSwitches()
          Subclasses override this method to set the switch fields #coreSwitch,#componentSwitch, #connectionSwitch,#featureSwitch,#flowSwitch, instanceSwitch, and #propertySwitchto analysis-specific switch implementations.
 void process(Element theElement)
          Calls the package-specific switch
 
Methods inherited from class edu.cmu.sei.aadl.modelsupport.modeltraversal.ForAllElement
action, cancelled, cancelTraversal, defaultTraversal, defaultTraversal, defaultTraversalAllDeclarativeModels, defaultTraversalAllInstances, error, error, getErrorManager, getResultList, info, info, internalError, internalError, notCancelled, processAllComponentImpl, processBottomUpComponentImpl, processBottomUpComponentImpl, processEList, processObject, processPostOrderAll, processPostOrderAll, processPostOrderAll, processPostOrderAllDeclarativeModels, processPostOrderAllInstances, processPostOrderComponentInstance, processPostOrderComponentInstance, processPreOrderAll, processPreOrderAll, processPreOrderAll, processPreOrderAllDeclarativeModels, processPreOrderAllInstances, processPreOrderComponentInstance, processPreOrderComponentInstance, processResources, processResources, processResourcesIgnoreFailure, processTopDownComponentClassifier, processTopDownComponentClassifierAllDeclarativeModels, processTopDownComponentImpl, processTopDownComponentImpl, processTree, processTreeIgnoreFailure, suchThat, warning, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

copyright

public static final java.lang.String copyright
See Also:
Constant Field Values

DONE

public static final java.lang.String DONE
See Also:
Constant Field Values

NOT_DONE

public static final java.lang.String NOT_DONE

INSTANCE

public static AadlProcessingSwitch INSTANCE

aadl2Switch

protected Aadl2Switch<java.lang.String> aadl2Switch

instanceSwitch

protected InstanceSwitch<java.lang.String> instanceSwitch
Constructor Detail

AadlProcessingSwitch

public AadlProcessingSwitch(int defTraversal,
                            AnalysisErrorReporterManager errMgr)

AadlProcessingSwitch

public AadlProcessingSwitch(int defTraversal)

AadlProcessingSwitch

public AadlProcessingSwitch(AnalysisErrorReporterManager errMgr)
Create an Aadl switch that delages to the given error manager.


AadlProcessingSwitch

public AadlProcessingSwitch()
Create an Aadl switch that uses AnalysisErrorReporterManager.NULL_ERROR_MANANGER.

Method Detail

initSwitches

protected abstract void initSwitches()
Subclasses override this method to set the switch fields #coreSwitch,#componentSwitch, #connectionSwitch,#featureSwitch,#flowSwitch, instanceSwitch, and #propertySwitchto analysis-specific switch implementations. Implementaions should take care, however, as this method is invoked by the constructor AadlProcessingSwitch(). Only the switches that are actually needed need to be initialized, as the switch fields are previously inialized to default do-nothing switch implementations.


getAadl2Switch

public final Aadl2Switch<java.lang.String> getAadl2Switch()
get Aadl2Switch

Returns:
Aadl2Switch

getInstanceSwitch

public final InstanceSwitch<java.lang.String> getInstanceSwitch()
get InstanceSwitch

Returns:
InstanceSwitch

process

public final void process(Element theElement)
Calls the package-specific switch

Overrides:
process in class ForAllElement
See Also:
ForAllElement.action(Element), ForAllElement.suchThat(Element)