blob: 4e922b58bea672839c952724b3df9f886adf27f4 [file] [log] [blame]
/**
* Copyright (c) 2020 CEA LIST
*
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v2.0 which
* accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
*/
package org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.util;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
import org.eclipse.papyrus.aiml.profile.AIML.Module.Model;
import org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.*;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> 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.
* <!-- end-user-doc -->
* @see org.eclipse.papyrus.aiml.profile.AIML.Normalization_layers.Normalization_layersPackage
* @generated
*/
public class Normalization_layersSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static Normalization_layersPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Normalization_layersSwitch() {
if (modelPackage == null) {
modelPackage = Normalization_layersPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @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 <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case Normalization_layersPackage.NORMALIZATION_LAYERS: {
Normalization_layers normalization_layers = (Normalization_layers)theEObject;
T result = caseNormalization_layers(normalization_layers);
if (result == null) result = caseModel(normalization_layers);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.NORMALIZATION_LAYERS_1: {
Normalization_layers_1 normalization_layers_1 = (Normalization_layers_1)theEObject;
T result = caseNormalization_layers_1(normalization_layers_1);
if (result == null) result = caseNormalization_layers(normalization_layers_1);
if (result == null) result = caseModel(normalization_layers_1);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.LAYER_NORM: {
LayerNorm layerNorm = (LayerNorm)theEObject;
T result = caseLayerNorm(layerNorm);
if (result == null) result = caseNormalization_layers_1(layerNorm);
if (result == null) result = caseNormalization_layers(layerNorm);
if (result == null) result = caseModel(layerNorm);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.LOCAL_RESPONSE_NORM: {
LocalResponseNorm localResponseNorm = (LocalResponseNorm)theEObject;
T result = caseLocalResponseNorm(localResponseNorm);
if (result == null) result = caseNormalization_layers(localResponseNorm);
if (result == null) result = caseModel(localResponseNorm);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.NORMALIZATION_LAYERS_11: {
Normalization_layers_1_1 normalization_layers_1_1 = (Normalization_layers_1_1)theEObject;
T result = caseNormalization_layers_1_1(normalization_layers_1_1);
if (result == null) result = caseNormalization_layers_1(normalization_layers_1_1);
if (result == null) result = caseNormalization_layers(normalization_layers_1_1);
if (result == null) result = caseModel(normalization_layers_1_1);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.NORMALIZATION_LAYERS_111: {
Normalization_layers_1_1_1 normalization_layers_1_1_1 = (Normalization_layers_1_1_1)theEObject;
T result = caseNormalization_layers_1_1_1(normalization_layers_1_1_1);
if (result == null) result = caseNormalization_layers_1_1(normalization_layers_1_1_1);
if (result == null) result = caseNormalization_layers_1(normalization_layers_1_1_1);
if (result == null) result = caseNormalization_layers(normalization_layers_1_1_1);
if (result == null) result = caseModel(normalization_layers_1_1_1);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.GROUP_NORM: {
GroupNorm groupNorm = (GroupNorm)theEObject;
T result = caseGroupNorm(groupNorm);
if (result == null) result = caseNormalization_layers_1_1(groupNorm);
if (result == null) result = caseNormalization_layers_1(groupNorm);
if (result == null) result = caseNormalization_layers(groupNorm);
if (result == null) result = caseModel(groupNorm);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.BATCH_NORM1D: {
BatchNorm1d batchNorm1d = (BatchNorm1d)theEObject;
T result = caseBatchNorm1d(batchNorm1d);
if (result == null) result = caseNormalization_layers_1_1_1(batchNorm1d);
if (result == null) result = caseNormalization_layers_1_1(batchNorm1d);
if (result == null) result = caseNormalization_layers_1(batchNorm1d);
if (result == null) result = caseNormalization_layers(batchNorm1d);
if (result == null) result = caseModel(batchNorm1d);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.BATCH_NORM2D: {
BatchNorm2d batchNorm2d = (BatchNorm2d)theEObject;
T result = caseBatchNorm2d(batchNorm2d);
if (result == null) result = caseNormalization_layers_1_1_1(batchNorm2d);
if (result == null) result = caseNormalization_layers_1_1(batchNorm2d);
if (result == null) result = caseNormalization_layers_1(batchNorm2d);
if (result == null) result = caseNormalization_layers(batchNorm2d);
if (result == null) result = caseModel(batchNorm2d);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.BATCH_NORM3D: {
BatchNorm3d batchNorm3d = (BatchNorm3d)theEObject;
T result = caseBatchNorm3d(batchNorm3d);
if (result == null) result = caseNormalization_layers_1_1_1(batchNorm3d);
if (result == null) result = caseNormalization_layers_1_1(batchNorm3d);
if (result == null) result = caseNormalization_layers_1(batchNorm3d);
if (result == null) result = caseNormalization_layers(batchNorm3d);
if (result == null) result = caseModel(batchNorm3d);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.SYNC_BATCH_NORM: {
SyncBatchNorm syncBatchNorm = (SyncBatchNorm)theEObject;
T result = caseSyncBatchNorm(syncBatchNorm);
if (result == null) result = caseNormalization_layers_1_1_1(syncBatchNorm);
if (result == null) result = caseNormalization_layers_1_1(syncBatchNorm);
if (result == null) result = caseNormalization_layers_1(syncBatchNorm);
if (result == null) result = caseNormalization_layers(syncBatchNorm);
if (result == null) result = caseModel(syncBatchNorm);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.INSTANCE_NORM1D: {
InstanceNorm1d instanceNorm1d = (InstanceNorm1d)theEObject;
T result = caseInstanceNorm1d(instanceNorm1d);
if (result == null) result = caseNormalization_layers_1_1_1(instanceNorm1d);
if (result == null) result = caseNormalization_layers_1_1(instanceNorm1d);
if (result == null) result = caseNormalization_layers_1(instanceNorm1d);
if (result == null) result = caseNormalization_layers(instanceNorm1d);
if (result == null) result = caseModel(instanceNorm1d);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.INSTANCE_NORM2D: {
InstanceNorm2d instanceNorm2d = (InstanceNorm2d)theEObject;
T result = caseInstanceNorm2d(instanceNorm2d);
if (result == null) result = caseNormalization_layers_1_1_1(instanceNorm2d);
if (result == null) result = caseNormalization_layers_1_1(instanceNorm2d);
if (result == null) result = caseNormalization_layers_1(instanceNorm2d);
if (result == null) result = caseNormalization_layers(instanceNorm2d);
if (result == null) result = caseModel(instanceNorm2d);
if (result == null) result = defaultCase(theEObject);
return result;
}
case Normalization_layersPackage.INSTANCE_NORM3D: {
InstanceNorm3d instanceNorm3d = (InstanceNorm3d)theEObject;
T result = caseInstanceNorm3d(instanceNorm3d);
if (result == null) result = caseNormalization_layers_1_1_1(instanceNorm3d);
if (result == null) result = caseNormalization_layers_1_1(instanceNorm3d);
if (result == null) result = caseNormalization_layers_1(instanceNorm3d);
if (result == null) result = caseNormalization_layers(instanceNorm3d);
if (result == null) result = caseModel(instanceNorm3d);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Normalization layers</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Normalization layers</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNormalization_layers(Normalization_layers object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Normalization layers 1</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Normalization layers 1</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNormalization_layers_1(Normalization_layers_1 object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Layer Norm</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Layer Norm</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLayerNorm(LayerNorm object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Local Response Norm</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Local Response Norm</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseLocalResponseNorm(LocalResponseNorm object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Normalization layers 11</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Normalization layers 11</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNormalization_layers_1_1(Normalization_layers_1_1 object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Normalization layers 111</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Normalization layers 111</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseNormalization_layers_1_1_1(Normalization_layers_1_1_1 object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Group Norm</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Group Norm</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGroupNorm(GroupNorm object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Batch Norm1d</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Batch Norm1d</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBatchNorm1d(BatchNorm1d object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Batch Norm2d</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Batch Norm2d</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBatchNorm2d(BatchNorm2d object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Batch Norm3d</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Batch Norm3d</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseBatchNorm3d(BatchNorm3d object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Sync Batch Norm</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Sync Batch Norm</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseSyncBatchNorm(SyncBatchNorm object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Instance Norm1d</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Instance Norm1d</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseInstanceNorm1d(InstanceNorm1d object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Instance Norm2d</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Instance Norm2d</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseInstanceNorm2d(InstanceNorm2d object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Instance Norm3d</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Instance Norm3d</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseInstanceNorm3d(InstanceNorm3d object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Model</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Model</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseModel(Model object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //Normalization_layersSwitch