edu.cmu.sei.aadl.model.util
Class AadlProcessingSwitch

java.lang.Object
  extended by edu.cmu.sei.aadl.model.util.ForAllAObject
      extended by edu.cmu.sei.aadl.model.util.AadlProcessingSwitch
Direct Known Subclasses:
AadlProcessingSwitchWithProgress, CheckInstancePropertiesSwitch, CheckInstanceSemanticsSwitch

public abstract class AadlProcessingSwitch
extends ForAllAObject

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  ComponentSwitch componentSwitch
           
protected  ConnectionSwitch connectionSwitch
           
static java.lang.String copyright
           
protected  CoreSwitch coreSwitch
           
static java.lang.String DONE
           
protected  FeatureSwitch featureSwitch
           
protected  FlowSwitch flowSwitch
           
static AadlProcessingSwitch INSTANCE
           
protected  InstanceSwitch instanceSwitch
           
static java.lang.String NOT_DONE
           
protected  PropertySwitch propertySwitch
           
protected  AadlProcessingSwitch self
          refers to itself.
 
Fields inherited from class edu.cmu.sei.aadl.model.util.ForAllAObject
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
 ComponentSwitch getComponentSwitch()
          get ComponentSwitch
 ConnectionSwitch getConnectionSwitch()
          get ConnectionSwitch
 CoreSwitch getCoreSwitch()
          get CoreSwitch
 FeatureSwitch getFeatureSwitch()
          get FeatureSwitch
 FlowSwitch getFlowSwitch()
          get FlowSwitch
 InstanceSwitch getInstanceSwitch()
          get InstanceSwitch
 PropertySwitch getPropertySwitch()
          get PropertySwitch
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(AObject theAObject)
          Calls the package-specific switch
 
Methods inherited from class edu.cmu.sei.aadl.model.util.ForAllAObject
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

coreSwitch

protected CoreSwitch coreSwitch

componentSwitch

protected ComponentSwitch componentSwitch

connectionSwitch

protected ConnectionSwitch connectionSwitch

featureSwitch

protected FeatureSwitch featureSwitch

flowSwitch

protected FlowSwitch flowSwitch

instanceSwitch

protected InstanceSwitch instanceSwitch

propertySwitch

protected PropertySwitch propertySwitch

self

protected AadlProcessingSwitch self
refers to itself. Used in case to call on itself for processing substructures

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.


getCoreSwitch

public final CoreSwitch getCoreSwitch()
get CoreSwitch

Returns:
CoreSwitch

getConnectionSwitch

public final ConnectionSwitch getConnectionSwitch()
get ConnectionSwitch

Returns:
ConnectionSwitch

getPropertySwitch

public final PropertySwitch getPropertySwitch()
get PropertySwitch

Returns:
PropertySwitch

getFlowSwitch

public final FlowSwitch getFlowSwitch()
get FlowSwitch

Returns:
FlowSwitch

getFeatureSwitch

public final FeatureSwitch getFeatureSwitch()
get FeatureSwitch

Returns:
FeatureSwitch

getComponentSwitch

public final ComponentSwitch getComponentSwitch()
get ComponentSwitch

Returns:
ComponentSwitch

getInstanceSwitch

public final InstanceSwitch getInstanceSwitch()
get InstanceSwitch

Returns:
InstanceSwitch

process

public final void process(AObject theAObject)
Calls the package-specific switch

Overrides:
process in class ForAllAObject
See Also:
ForAllAObject.action(AObject), ForAllAObject.suchThat(AObject)