blob: ca10bd47707325de289cd1e62a40428c1545b025 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011, 2014 Willink Transformations and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.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.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 QVTtemplatePackage.COLLECTION_TEMPLATE_EXP: return createCollectionTemplateExp();
case QVTtemplatePackage.OBJECT_TEMPLATE_EXP: return createObjectTemplateExp();
case QVTtemplatePackage.PROPERTY_TEMPLATE_ITEM: return createPropertyTemplateItem();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public CollectionTemplateExp createCollectionTemplateExp() {
CollectionTemplateExpImpl collectionTemplateExp = new CollectionTemplateExpImpl();
return collectionTemplateExp;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ObjectTemplateExp createObjectTemplateExp() {
ObjectTemplateExpImpl objectTemplateExp = new ObjectTemplateExpImpl();
return objectTemplateExp;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public 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