blob: 4eadc9e3bb183a0c851338bd04c573199fde18ab [file] [log] [blame]
/**
* Copyright (c) 2010, 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.runtime.qvtruntimelibrary;
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;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see org.eclipse.qvtd.runtime.qvtruntimelibrary.QVTruntimeLibraryPackage
* @generated
*/
public class QVTruntimeLibraryFactory extends EFactoryImpl {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final QVTruntimeLibraryFactory eINSTANCE = init();
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static QVTruntimeLibraryFactory init() {
try {
QVTruntimeLibraryFactory theQVTruntimeLibraryFactory = (QVTruntimeLibraryFactory)EPackage.Registry.INSTANCE.getEFactory(QVTruntimeLibraryPackage.eNS_URI);
if (theQVTruntimeLibraryFactory != null) {
return theQVTruntimeLibraryFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new QVTruntimeLibraryFactory();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QVTruntimeLibraryFactory() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case 0: return createExtent();
case 1: return createModel();
case 2: return createTransformation();
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
*/
public Extent createExtent() {
Extent extent = new Extent();
return extent;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Model createModel() {
Model model = new Model();
return model;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Transformation createTransformation() {
Transformation transformation = new Transformation();
return transformation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public QVTruntimeLibraryPackage getQVTruntimeLibraryPackage() {
return (QVTruntimeLibraryPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static QVTruntimeLibraryPackage getPackage() {
return QVTruntimeLibraryPackage.eINSTANCE;
}
} //QVTruntimeLibraryFactory