edu.cmu.sei.aadl.aadl2.instance.util
Class InstanceSwitch<T>

java.lang.Object
  extended by edu.cmu.sei.aadl.aadl2.instance.util.InstanceSwitch<T>

public class InstanceSwitch<T>
extends java.lang.Object

The Switch for the model's inheritance hierarchy. It supports the call doSwitch(object) to invoke the caseXXX method for each class of the model, starting with the actual class of the object and proceeding up the inheritance hierarchy until a non-null result is returned, which is the result of the switch.

See Also:
InstancePackage

Field Summary
protected static InstancePackage modelPackage
          The cached model package
 
Constructor Summary
InstanceSwitch()
          Creates an instance of the switch
 
Method Summary
 T caseClassifierFeature(ClassifierFeature object)
          Returns the result of interpreting the object as an instance of 'Classifier Feature'
 T caseComponentInstance(ComponentInstance object)
          Returns the result of interpreting the object as an instance of 'Component Instance'
 T caseConnectionInstance(ConnectionInstance object)
          Returns the result of interpreting the object as an instance of 'Connection Instance'
 T caseConnectionInstanceEnd(ConnectionInstanceEnd object)
          Returns the result of interpreting the object as an instance of 'Connection Instance End'
 T caseConnectionReference(ConnectionReference object)
          Returns the result of interpreting the object as an instance of 'Connection Reference'
 T caseElement(Element object)
          Returns the result of interpreting the object as an instance of 'Element'
 T caseEndToEndFlowInstance(EndToEndFlowInstance object)
          Returns the result of interpreting the object as an instance of 'End To End Flow Instance'
 T caseFeatureInstance(FeatureInstance object)
          Returns the result of interpreting the object as an instance of 'Feature Instance'
 T caseFlowElementInstance(FlowElementInstance object)
          Returns the result of interpreting the object as an instance of 'Flow Element Instance'
 T caseFlowSpecificationInstance(FlowSpecificationInstance object)
          Returns the result of interpreting the object as an instance of 'Flow Specification Instance'
 T caseInstanceObject(InstanceObject object)
          Returns the result of interpreting the object as an instance of 'Object'
 T caseInstanceReferenceValue(InstanceReferenceValue object)
          Returns the result of interpreting the object as an instance of 'Reference Value'
 T caseMode(Mode object)
          Returns the result of interpreting the object as an instance of 'Mode'
 T caseModeFeature(ModeFeature object)
          Returns the result of interpreting the object as an instance of 'Mode Feature'
 T caseModeInstance(ModeInstance object)
          Returns the result of interpreting the object as an instance of 'Mode Instance'
 T caseModeTransitionInstance(ModeTransitionInstance object)
          Returns the result of interpreting the object as an instance of 'Mode Transition Instance'
 T caseNamedElement(NamedElement object)
          Returns the result of interpreting the object as an instance of 'Named Element'
 T casePropertyExpression(PropertyExpression object)
          Returns the result of interpreting the object as an instance of 'Property Expression'
 T casePropertyValue(PropertyValue object)
          Returns the result of interpreting the object as an instance of 'Property Value'
 T caseSystemInstance(SystemInstance object)
          Returns the result of interpreting the object as an instance of 'System Instance'
 T caseSystemOperationMode(SystemOperationMode object)
          Returns the result of interpreting the object as an instance of 'System Operation Mode'
 T defaultCase(org.eclipse.emf.ecore.EObject object)
          Returns the result of interpreting the object as an instance of 'EObject'
protected  T doSwitch(org.eclipse.emf.ecore.EClass theEClass, org.eclipse.emf.ecore.EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
 T doSwitch(org.eclipse.emf.ecore.EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
protected  T doSwitch(int classifierID, org.eclipse.emf.ecore.EObject theEObject)
          Calls caseXXX for each class of the model until one returns a non null result; it yields that result
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

modelPackage

protected static InstancePackage modelPackage
The cached model package

Constructor Detail

InstanceSwitch

public InstanceSwitch()
Creates an instance of the switch.

Method Detail

doSwitch

public T doSwitch(org.eclipse.emf.ecore.EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

doSwitch

protected T doSwitch(org.eclipse.emf.ecore.EClass theEClass,
                     org.eclipse.emf.ecore.EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

doSwitch

protected T doSwitch(int classifierID,
                     org.eclipse.emf.ecore.EObject theEObject)
Calls caseXXX for each class of the model until one returns a non null result; it yields that result.

Returns:
the first non-null result returned by a caseXXX call.

caseFeatureInstance

public T caseFeatureInstance(FeatureInstance object)
Returns the result of interpreting the object as an instance of 'Feature Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Feature Instance'.
See Also:
doSwitch(EObject)

caseInstanceObject

public T caseInstanceObject(InstanceObject object)
Returns the result of interpreting the object as an instance of 'Object'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Object'.
See Also:
doSwitch(EObject)

caseConnectionInstanceEnd

public T caseConnectionInstanceEnd(ConnectionInstanceEnd object)
Returns the result of interpreting the object as an instance of 'Connection Instance End'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Connection Instance End'.
See Also:
doSwitch(EObject)

caseConnectionInstance

public T caseConnectionInstance(ConnectionInstance object)
Returns the result of interpreting the object as an instance of 'Connection Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Connection Instance'.
See Also:
doSwitch(EObject)

caseFlowElementInstance

public T caseFlowElementInstance(FlowElementInstance object)
Returns the result of interpreting the object as an instance of 'Flow Element Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Flow Element Instance'.
See Also:
doSwitch(EObject)

caseSystemOperationMode

public T caseSystemOperationMode(SystemOperationMode object)
Returns the result of interpreting the object as an instance of 'System Operation Mode'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'System Operation Mode'.
See Also:
doSwitch(EObject)

caseModeInstance

public T caseModeInstance(ModeInstance object)
Returns the result of interpreting the object as an instance of 'Mode Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Mode Instance'.
See Also:
doSwitch(EObject)

caseModeTransitionInstance

public T caseModeTransitionInstance(ModeTransitionInstance object)
Returns the result of interpreting the object as an instance of 'Mode Transition Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Mode Transition Instance'.
See Also:
doSwitch(EObject)

caseConnectionReference

public T caseConnectionReference(ConnectionReference object)
Returns the result of interpreting the object as an instance of 'Connection Reference'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Connection Reference'.
See Also:
doSwitch(EObject)

caseComponentInstance

public T caseComponentInstance(ComponentInstance object)
Returns the result of interpreting the object as an instance of 'Component Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Component Instance'.
See Also:
doSwitch(EObject)

caseFlowSpecificationInstance

public T caseFlowSpecificationInstance(FlowSpecificationInstance object)
Returns the result of interpreting the object as an instance of 'Flow Specification Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Flow Specification Instance'.
See Also:
doSwitch(EObject)

caseEndToEndFlowInstance

public T caseEndToEndFlowInstance(EndToEndFlowInstance object)
Returns the result of interpreting the object as an instance of 'End To End Flow Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'End To End Flow Instance'.
See Also:
doSwitch(EObject)

caseSystemInstance

public T caseSystemInstance(SystemInstance object)
Returns the result of interpreting the object as an instance of 'System Instance'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'System Instance'.
See Also:
doSwitch(EObject)

caseInstanceReferenceValue

public T caseInstanceReferenceValue(InstanceReferenceValue object)
Returns the result of interpreting the object as an instance of 'Reference Value'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Reference Value'.
See Also:
doSwitch(EObject)

caseElement

public T caseElement(Element object)
Returns the result of interpreting the object as an instance of 'Element'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Element'.
See Also:
doSwitch(EObject)

caseNamedElement

public T caseNamedElement(NamedElement object)
Returns the result of interpreting the object as an instance of 'Named Element'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Named Element'.
See Also:
doSwitch(EObject)

caseClassifierFeature

public T caseClassifierFeature(ClassifierFeature object)
Returns the result of interpreting the object as an instance of 'Classifier Feature'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Classifier Feature'.
See Also:
doSwitch(EObject)

caseModeFeature

public T caseModeFeature(ModeFeature object)
Returns the result of interpreting the object as an instance of 'Mode Feature'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Mode Feature'.
See Also:
doSwitch(EObject)

caseMode

public T caseMode(Mode object)
Returns the result of interpreting the object as an instance of 'Mode'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Mode'.
See Also:
doSwitch(EObject)

casePropertyExpression

public T casePropertyExpression(PropertyExpression object)
Returns the result of interpreting the object as an instance of 'Property Expression'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Property Expression'.
See Also:
doSwitch(EObject)

casePropertyValue

public T casePropertyValue(PropertyValue object)
Returns the result of interpreting the object as an instance of 'Property Value'. This implementation returns null; returning a non-null result will terminate the switch.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'Property Value'.
See Also:
doSwitch(EObject)

defaultCase

public T defaultCase(org.eclipse.emf.ecore.EObject object)
Returns the result of interpreting the object as an instance of 'EObject'. This implementation returns null; returning a non-null result will terminate the switch, but this is the last case anyway.

Parameters:
object - the target of the switch.
Returns:
the result of interpreting the object as an instance of 'EObject'.
See Also:
doSwitch(org.eclipse.emf.ecore.EObject)