Class SimpleSwitch<T>
java.lang.Object
org.eclipse.emf.ecore.util.Switch<T>
com.regnosys.rosetta.rosetta.simple.util.SimpleSwitch<T>
public class SimpleSwitch<T>
extends org.eclipse.emf.ecore.util.Switch<T>
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:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncaseAnnotated(Annotated object) Returns the result of interpreting the object as an instance of 'Annotated'.caseAnnotation(Annotation object) Returns the result of interpreting the object as an instance of 'Annotation'.Returns the result of interpreting the object as an instance of 'Annotation Qualifier'.caseAnnotationRef(AnnotationRef object) Returns the result of interpreting the object as an instance of 'Annotation Ref'.caseAssignPathRoot(AssignPathRoot object) Returns the result of interpreting the object as an instance of 'Assign Path Root'.caseAttribute(Attribute object) Returns the result of interpreting the object as an instance of 'Attribute'.caseChoice(Choice object) Returns the result of interpreting the object as an instance of 'Choice'.caseChoiceOption(ChoiceOption object) Returns the result of interpreting the object as an instance of 'Choice Option'.caseCondition(Condition object) Returns the result of interpreting the object as an instance of 'Condition'.Returns the result of interpreting the object as an instance of 'Data'.caseFunction(Function object) Returns the result of interpreting the object as an instance of 'Function'.caseFunctionDispatch(FunctionDispatch object) Returns the result of interpreting the object as an instance of 'Function Dispatch'.caseOperation(Operation object) Returns the result of interpreting the object as an instance of 'Operation'.caseReferences(References object) Returns the result of interpreting the object as an instance of 'References'.caseRootElement(RootElement object) Returns the result of interpreting the object as an instance of 'Root Element'.Returns the result of interpreting the object as an instance of 'Callable With Args'.caseRosettaDefinable(RosettaDefinable object) Returns the result of interpreting the object as an instance of 'Definable'.caseRosettaFeature(RosettaFeature object) Returns the result of interpreting the object as an instance of 'Feature'.caseRosettaNamed(RosettaNamed object) Returns the result of interpreting the object as an instance of 'Named'.Returns the result of interpreting the object as an instance of 'Root Element'.Returns the result of interpreting the object as an instance of 'Rosetta Rule Reference'.caseRosettaSymbol(RosettaSymbol object) Returns the result of interpreting the object as an instance of 'Symbol'.caseRosettaType(RosettaType object) Returns the result of interpreting the object as an instance of 'Type'.caseRosettaTyped(RosettaTyped object) Returns the result of interpreting the object as an instance of 'Typed'.Returns the result of interpreting the object as an instance of 'Typed Feature'.caseSegment(Segment object) Returns the result of interpreting the object as an instance of 'Segment'.Returns the result of interpreting the object as an instance of 'Shortcut Declaration'.defaultCase(org.eclipse.emf.ecore.EObject object) Returns the result of interpreting the object as an instance of 'EObject'.protected TdoSwitch(int classifierID, org.eclipse.emf.ecore.EObject theEObject) CallscaseXXXfor each class of the model until one returns a non null result; it yields that result.protected booleanisSwitchFor(org.eclipse.emf.ecore.EPackage ePackage) Checks whether this is a switch for the given package.Methods inherited from class org.eclipse.emf.ecore.util.Switch
doSwitch, doSwitch
-
Field Details
-
modelPackage
The cached model package
-
-
Constructor Details
-
SimpleSwitch
public SimpleSwitch()Creates an instance of the switch.
-
-
Method Details
-
isSwitchFor
protected boolean isSwitchFor(org.eclipse.emf.ecore.EPackage ePackage) Checks whether this is a switch for the given package.- Specified by:
isSwitchForin classorg.eclipse.emf.ecore.util.Switch<T>- Parameters:
ePackage- the package in question.- Returns:
- whether this is a switch for the given package.
-
doSwitch
CallscaseXXXfor each class of the model until one returns a non null result; it yields that result.- Overrides:
doSwitchin classorg.eclipse.emf.ecore.util.Switch<T>- Returns:
- the first non-null result returned by a
caseXXXcall.
-
caseRootElement
Returns the result of interpreting the object as an instance of 'Root 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 'Root Element'.
- See Also:
-
doSwitch(EObject)
-
caseAnnotation
Returns the result of interpreting the object as an instance of 'Annotation'. 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 'Annotation'.
- See Also:
-
doSwitch(EObject)
-
caseAnnotated
Returns the result of interpreting the object as an instance of 'Annotated'. 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 'Annotated'.
- See Also:
-
doSwitch(EObject)
-
caseAnnotationQualifier
Returns the result of interpreting the object as an instance of 'Annotation Qualifier'. 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 'Annotation Qualifier'.
- See Also:
-
doSwitch(EObject)
-
caseAnnotationRef
Returns the result of interpreting the object as an instance of 'Annotation Ref'. 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 'Annotation Ref'.
- See Also:
-
doSwitch(EObject)
-
caseAssignPathRoot
Returns the result of interpreting the object as an instance of 'Assign Path Root'. 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 'Assign Path Root'.
- See Also:
-
doSwitch(EObject)
-
caseAttribute
Returns the result of interpreting the object as an instance of 'Attribute'. 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 'Attribute'.
- See Also:
-
doSwitch(EObject)
-
caseData
Returns the result of interpreting the object as an instance of 'Data'. 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 'Data'.
- See Also:
-
doSwitch(EObject)
-
caseChoice
Returns the result of interpreting the object as an instance of 'Choice'. 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 'Choice'.
- See Also:
-
doSwitch(EObject)
-
caseChoiceOption
Returns the result of interpreting the object as an instance of 'Choice Option'. 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 'Choice Option'.
- See Also:
-
doSwitch(EObject)
-
caseFunction
Returns the result of interpreting the object as an instance of 'Function'. 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 'Function'.
- See Also:
-
doSwitch(EObject)
-
caseFunctionDispatch
Returns the result of interpreting the object as an instance of 'Function Dispatch'. 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 'Function Dispatch'.
- See Also:
-
doSwitch(EObject)
-
caseCondition
Returns the result of interpreting the object as an instance of 'Condition'. 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 'Condition'.
- See Also:
-
doSwitch(EObject)
-
caseOperation
Returns the result of interpreting the object as an instance of 'Operation'. 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 'Operation'.
- See Also:
-
doSwitch(EObject)
-
caseSegment
Returns the result of interpreting the object as an instance of 'Segment'. 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 'Segment'.
- See Also:
-
doSwitch(EObject)
-
caseShortcutDeclaration
Returns the result of interpreting the object as an instance of 'Shortcut Declaration'. 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 'Shortcut Declaration'.
- See Also:
-
doSwitch(EObject)
-
caseReferences
Returns the result of interpreting the object as an instance of 'References'. 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 'References'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaRuleReference
Returns the result of interpreting the object as an instance of 'Rosetta Rule 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 'Rosetta Rule Reference'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaRootElement
Returns the result of interpreting the object as an instance of 'Root 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 'Root Element'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaNamed
Returns the result of interpreting the object as an instance of 'Named'. 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'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaDefinable
Returns the result of interpreting the object as an instance of 'Definable'. 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 'Definable'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaSymbol
Returns the result of interpreting the object as an instance of 'Symbol'. 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 'Symbol'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaFeature
Returns the result of interpreting the object as an instance of '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 'Feature'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaTyped
Returns the result of interpreting the object as an instance of 'Typed'. 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 'Typed'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaTypedFeature
Returns the result of interpreting the object as an instance of 'Typed 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 'Typed Feature'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaType
Returns the result of interpreting the object as an instance of 'Type'. 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 'Type'.
- See Also:
-
doSwitch(EObject)
-
caseRosettaCallableWithArgs
Returns the result of interpreting the object as an instance of 'Callable With Args'. 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 'Callable With Args'.
- See Also:
-
doSwitch(EObject)
-
defaultCase
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.- Overrides:
defaultCasein classorg.eclipse.emf.ecore.util.Switch<T>- Parameters:
object- the target of the switch.- Returns:
- the result of interpreting the object as an instance of 'EObject'.
- See Also:
-
Switch.doSwitch(org.eclipse.emf.ecore.EObject)
-