| /******************************************************************************* |
| * Copyright (c) 2011, 2019 Willink Transformations and others. |
| * 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 |
| * http://www.eclipse.org/legal/epl-v20.html |
| * |
| * Contributors: |
| * E.D.Willink - initial API and implementation |
| *******************************************************************************/ |
| package org.eclipse.qvtd.pivot.qvttemplate.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.jdt.annotation.NonNull; |
| import org.eclipse.qvtd.pivot.qvttemplate.CollectionTemplateExp; |
| import org.eclipse.qvtd.pivot.qvttemplate.ObjectTemplateExp; |
| import org.eclipse.qvtd.pivot.qvttemplate.PropertyTemplateItem; |
| import org.eclipse.qvtd.pivot.qvttemplate.QVTtemplateFactory; |
| import org.eclipse.qvtd.pivot.qvttemplate.QVTtemplatePackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class QVTtemplateFactoryImpl extends EFactoryImpl implements QVTtemplateFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static QVTtemplateFactory init() { |
| try { |
| QVTtemplateFactory theQVTtemplateFactory = (QVTtemplateFactory)EPackage.Registry.INSTANCE.getEFactory(QVTtemplatePackage.eNS_URI); |
| if (theQVTtemplateFactory != null) { |
| return theQVTtemplateFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new QVTtemplateFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public QVTtemplateFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case 0: return createCollectionTemplateExp(); |
| case 1: return createObjectTemplateExp(); |
| case 2: return createPropertyTemplateItem(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull CollectionTemplateExp createCollectionTemplateExp() { |
| CollectionTemplateExpImpl collectionTemplateExp = new CollectionTemplateExpImpl(); |
| return collectionTemplateExp; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull ObjectTemplateExp createObjectTemplateExp() { |
| ObjectTemplateExpImpl objectTemplateExp = new ObjectTemplateExpImpl(); |
| return objectTemplateExp; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull PropertyTemplateItem createPropertyTemplateItem() { |
| PropertyTemplateItemImpl propertyTemplateItem = new PropertyTemplateItemImpl(); |
| return propertyTemplateItem; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public QVTtemplatePackage getQVTtemplatePackage() { |
| return (QVTtemplatePackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static QVTtemplatePackage getPackage() { |
| return QVTtemplatePackage.eINSTANCE; |
| } |
| |
| } //QVTtemplateFactoryImpl |