blob: 0653e7477c17c5c884aae6c6eb016598a7c727b6 [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.Vision_layers.impl;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
import org.eclipse.papyrus.aiml.profile.AIML.Vision_layers.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class Vision_layersFactoryImpl extends EFactoryImpl implements Vision_layersFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Vision_layersFactory init() {
try {
Vision_layersFactory theVision_layersFactory = (Vision_layersFactory)EPackage.Registry.INSTANCE.getEFactory(Vision_layersPackage.eNS_URI);
if (theVision_layersFactory != null) {
return theVision_layersFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new Vision_layersFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Vision_layersFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case Vision_layersPackage.PIXEL_SHUFFLE: return createPixelShuffle();
case Vision_layersPackage.UPSAMPLE: return createUpsample();
case Vision_layersPackage.UPSAMPLING_NEAREST2D: return createUpsamplingNearest2d();
case Vision_layersPackage.UPSAMPLING_BILINEAR2D: return createUpsamplingBilinear2d();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public PixelShuffle createPixelShuffle() {
PixelShuffleImpl pixelShuffle = new PixelShuffleImpl();
return pixelShuffle;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Upsample createUpsample() {
UpsampleImpl upsample = new UpsampleImpl();
return upsample;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public UpsamplingNearest2d createUpsamplingNearest2d() {
UpsamplingNearest2dImpl upsamplingNearest2d = new UpsamplingNearest2dImpl();
return upsamplingNearest2d;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public UpsamplingBilinear2d createUpsamplingBilinear2d() {
UpsamplingBilinear2dImpl upsamplingBilinear2d = new UpsamplingBilinear2dImpl();
return upsamplingBilinear2d;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Vision_layersPackage getVision_layersPackage() {
return (Vision_layersPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static Vision_layersPackage getPackage() {
return Vision_layersPackage.eINSTANCE;
}
} //Vision_layersFactoryImpl