/** * generated by Xtext 2.12.0 */ package com.minres.rdl.rdl.util; import com.minres.rdl.rdl.*; import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.EPackage; import org.eclipse.emf.ecore.util.Switch; /** * * The Switch for the model's inheritance hierarchy. * It supports the call {@link #doSwitch(EObject) 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 com.minres.rdl.rdl.RdlPackage * @generated */ public class RdlSwitch extends Switch { /** * The cached model package * * * @generated */ protected static RdlPackage modelPackage; /** * Creates an instance of the switch. * * * @generated */ public RdlSwitch() { if (modelPackage == null) { modelPackage = RdlPackage.eINSTANCE; } } /** * Checks whether this is a switch for the given package. * * * @param ePackage the package in question. * @return whether this is a switch for the given package. * @generated */ @Override protected boolean isSwitchFor(EPackage ePackage) { return ePackage == modelPackage; } /** * Calls caseXXX for each class of the model until one returns a non null result; it yields that result. * * * @return the first non-null result returned by a caseXXX call. * @generated */ @Override protected T doSwitch(int classifierID, EObject theEObject) { switch (classifierID) { case RdlPackage.ROOT: { Root root = (Root)theEObject; T result = caseRoot(root); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.INCLUDE: { Include include = (Include)theEObject; T result = caseInclude(include); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.PROPERTY_DEFINITION: { PropertyDefinition propertyDefinition = (PropertyDefinition)theEObject; T result = casePropertyDefinition(propertyDefinition); if (result == null) result = caseEntity(propertyDefinition); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.PROPERTY_DEFAULT: { PropertyDefault propertyDefault = (PropertyDefault)theEObject; T result = casePropertyDefault(propertyDefault); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.PROPERTY_USAGE: { PropertyUsage propertyUsage = (PropertyUsage)theEObject; T result = casePropertyUsage(propertyUsage); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.COMPONENT_DEFINITION: { ComponentDefinition componentDefinition = (ComponentDefinition)theEObject; T result = caseComponentDefinition(componentDefinition); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.INSTANTIATION: { Instantiation instantiation = (Instantiation)theEObject; T result = caseInstantiation(instantiation); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.COMPONENT_INSTANCE: { ComponentInstance componentInstance = (ComponentInstance)theEObject; T result = caseComponentInstance(componentInstance); if (result == null) result = caseEntity(componentInstance); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.RANGE: { Range range = (Range)theEObject; T result = caseRange(range); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.PROPERTY_ASSIGNMENT: { PropertyAssignment propertyAssignment = (PropertyAssignment)theEObject; T result = casePropertyAssignment(propertyAssignment); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.DEFAULT_PROPERY_ASSIGNMENT: { DefaultProperyAssignment defaultProperyAssignment = (DefaultProperyAssignment)theEObject; T result = caseDefaultProperyAssignment(defaultProperyAssignment); if (result == null) result = casePropertyAssignment(defaultProperyAssignment); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.EXPLICIT_PROPERTY_ASSIGNMENT: { ExplicitPropertyAssignment explicitPropertyAssignment = (ExplicitPropertyAssignment)theEObject; T result = caseExplicitPropertyAssignment(explicitPropertyAssignment); if (result == null) result = caseDefaultProperyAssignment(explicitPropertyAssignment); if (result == null) result = casePropertyAssignment(explicitPropertyAssignment); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.POST_PROPERTY_ASSIGNMENT: { PostPropertyAssignment postPropertyAssignment = (PostPropertyAssignment)theEObject; T result = casePostPropertyAssignment(postPropertyAssignment); if (result == null) result = casePropertyAssignment(postPropertyAssignment); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.INSTANCE_PROPERTY_REF: { InstancePropertyRef instancePropertyRef = (InstancePropertyRef)theEObject; T result = caseInstancePropertyRef(instancePropertyRef); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.ENTITY: { Entity entity = (Entity)theEObject; T result = caseEntity(entity); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.INSTANCE_REF: { InstanceRef instanceRef = (InstanceRef)theEObject; T result = caseInstanceRef(instanceRef); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.PROPERTY_ASSIGNMENT_RHS: { PropertyAssignmentRhs propertyAssignmentRhs = (PropertyAssignmentRhs)theEObject; T result = casePropertyAssignmentRhs(propertyAssignmentRhs); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.CONCAT: { Concat concat = (Concat)theEObject; T result = caseConcat(concat); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.CONCAT_ELEM: { ConcatElem concatElem = (ConcatElem)theEObject; T result = caseConcatElem(concatElem); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.RVALUE: { RValue rValue = (RValue)theEObject; T result = caseRValue(rValue); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.ENUM_DEFINITION: { EnumDefinition enumDefinition = (EnumDefinition)theEObject; T result = caseEnumDefinition(enumDefinition); if (result == null) result = caseEntity(enumDefinition); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.ENUM_BODY: { EnumBody enumBody = (EnumBody)theEObject; T result = caseEnumBody(enumBody); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.ENUM_ENTRY: { EnumEntry enumEntry = (EnumEntry)theEObject; T result = caseEnumEntry(enumEntry); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.ENUM_PROPERTY: { EnumProperty enumProperty = (EnumProperty)theEObject; T result = caseEnumProperty(enumProperty); if (result == null) result = defaultCase(theEObject); return result; } case RdlPackage.ENUM_INSTANCE_TYPE: { EnumInstanceType enumInstanceType = (EnumInstanceType)theEObject; T result = caseEnumInstanceType(enumInstanceType); if (result == null) result = defaultCase(theEObject); return result; } default: return defaultCase(theEObject); } } /** * Returns the result of interpreting the object as an instance of 'Root'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Root'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRoot(Root object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Include'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Include'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseInclude(Include object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Property Definition'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Property Definition'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePropertyDefinition(PropertyDefinition object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Property Default'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Property Default'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePropertyDefault(PropertyDefault object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Property Usage'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Property Usage'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePropertyUsage(PropertyUsage object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Component Definition'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Component Definition'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseComponentDefinition(ComponentDefinition object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Instantiation'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Instantiation'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseInstantiation(Instantiation object) { return null; } /** * 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. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Component Instance'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseComponentInstance(ComponentInstance object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Range'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Range'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRange(Range object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Property Assignment'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Property Assignment'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePropertyAssignment(PropertyAssignment object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Default Propery Assignment'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Default Propery Assignment'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseDefaultProperyAssignment(DefaultProperyAssignment object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Explicit Property Assignment'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Explicit Property Assignment'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseExplicitPropertyAssignment(ExplicitPropertyAssignment object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Post Property Assignment'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Post Property Assignment'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePostPropertyAssignment(PostPropertyAssignment object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Instance Property Ref'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Instance Property Ref'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseInstancePropertyRef(InstancePropertyRef object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Entity'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Entity'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEntity(Entity object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Instance Ref'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Instance Ref'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseInstanceRef(InstanceRef object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Property Assignment Rhs'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Property Assignment Rhs'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T casePropertyAssignmentRhs(PropertyAssignmentRhs object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Concat'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Concat'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConcat(Concat object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Concat Elem'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Concat Elem'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseConcatElem(ConcatElem object) { return null; } /** * Returns the result of interpreting the object as an instance of 'RValue'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'RValue'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseRValue(RValue object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Enum Definition'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Enum Definition'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEnumDefinition(EnumDefinition object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Enum Body'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Enum Body'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEnumBody(EnumBody object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Enum Entry'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Enum Entry'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEnumEntry(EnumEntry object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Enum Property'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Enum Property'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEnumProperty(EnumProperty object) { return null; } /** * Returns the result of interpreting the object as an instance of 'Enum Instance Type'. * * This implementation returns null; * returning a non-null result will terminate the switch. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'Enum Instance Type'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject) * @generated */ public T caseEnumInstanceType(EnumInstanceType object) { return null; } /** * 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. * * @param object the target of the switch. * @return the result of interpreting the object as an instance of 'EObject'. * @see #doSwitch(org.eclipse.emf.ecore.EObject) * @generated */ @Override public T defaultCase(EObject object) { return null; } } //RdlSwitch