| /******************************************************************************* |
| * Copyright (c) 2011, 2018 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.qvtrelation.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.qvtrelation.*; |
| import org.eclipse.qvtd.pivot.qvtrelation.DomainPattern; |
| import org.eclipse.qvtd.pivot.qvtrelation.Key; |
| import org.eclipse.qvtd.pivot.qvtrelation.QVTrelationFactory; |
| import org.eclipse.qvtd.pivot.qvtrelation.QVTrelationPackage; |
| import org.eclipse.qvtd.pivot.qvtrelation.Relation; |
| import org.eclipse.qvtd.pivot.qvtrelation.RelationCallExp; |
| import org.eclipse.qvtd.pivot.qvtrelation.RelationDomain; |
| import org.eclipse.qvtd.pivot.qvtrelation.RelationDomainAssignment; |
| import org.eclipse.qvtd.pivot.qvtrelation.RelationImplementation; |
| import org.eclipse.qvtd.pivot.qvtrelation.RelationModel; |
| import org.eclipse.qvtd.pivot.qvtrelation.RelationalTransformation; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class QVTrelationFactoryImpl extends EFactoryImpl implements QVTrelationFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static QVTrelationFactory init() { |
| try { |
| QVTrelationFactory theQVTrelationFactory = (QVTrelationFactory)EPackage.Registry.INSTANCE.getEFactory(QVTrelationPackage.eNS_URI); |
| if (theQVTrelationFactory != null) { |
| return theQVTrelationFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new QVTrelationFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public QVTrelationFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case 0: return createDomainPattern(); |
| case 1: return createKey(); |
| case 2: return createRelation(); |
| case 3: return createRelationCallExp(); |
| case 4: return createRelationDomain(); |
| case 5: return createRelationDomainAssignment(); |
| case 6: return createRelationImplementation(); |
| case 7: return createRelationModel(); |
| case 8: return createRelationalTransformation(); |
| case 9: return createSharedVariable(); |
| case 10: return createTemplateVariable(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull DomainPattern createDomainPattern() { |
| DomainPatternImpl domainPattern = new DomainPatternImpl(); |
| return domainPattern; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull Key createKey() { |
| KeyImpl key = new KeyImpl(); |
| return key; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull Relation createRelation() { |
| RelationImpl relation = new RelationImpl(); |
| return relation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull RelationCallExp createRelationCallExp() { |
| RelationCallExpImpl relationCallExp = new RelationCallExpImpl(); |
| return relationCallExp; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull RelationDomain createRelationDomain() { |
| RelationDomainImpl relationDomain = new RelationDomainImpl(); |
| return relationDomain; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull RelationDomainAssignment createRelationDomainAssignment() { |
| RelationDomainAssignmentImpl relationDomainAssignment = new RelationDomainAssignmentImpl(); |
| return relationDomainAssignment; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull RelationModel createRelationModel() { |
| RelationModelImpl relationModel = new RelationModelImpl(); |
| return relationModel; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull RelationImplementation createRelationImplementation() { |
| RelationImplementationImpl relationImplementation = new RelationImplementationImpl(); |
| return relationImplementation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull RelationalTransformation createRelationalTransformation() { |
| RelationalTransformationImpl relationalTransformation = new RelationalTransformationImpl(); |
| return relationalTransformation; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull SharedVariable createSharedVariable() { |
| SharedVariableImpl sharedVariable = new SharedVariableImpl(); |
| return sharedVariable; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public @NonNull TemplateVariable createTemplateVariable() { |
| TemplateVariableImpl templateVariable = new TemplateVariableImpl(); |
| return templateVariable; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public QVTrelationPackage getQVTrelationPackage() { |
| return (QVTrelationPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static QVTrelationPackage getPackage() { |
| return QVTrelationPackage.eINSTANCE; |
| } |
| |
| } //QVTrelationFactoryImpl |