blob: 66d27f2f0c981b97620f17d5812f5b81836e969b [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 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.cs2as.compiler.cgmodel.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.cs2as.compiler.cgmodel.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class CS2ASCGFactoryImpl extends EFactoryImpl implements CS2ASCGFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static CS2ASCGFactory init() {
try {
CS2ASCGFactory theCS2ASCGFactory = (CS2ASCGFactory)EPackage.Registry.INSTANCE.getEFactory(CS2ASCGPackage.eNS_URI);
if (theCS2ASCGFactory != null) {
return theCS2ASCGFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new CS2ASCGFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CS2ASCGFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case CS2ASCGPackage.CG_LOOKUP_CALL_EXP: return createCGLookupCallExp();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CGLookupCallExp createCGLookupCallExp() {
CGLookupCallExpImpl cgLookupCallExp = new CGLookupCallExpImpl();
return cgLookupCallExp;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CS2ASCGPackage getCS2ASCGPackage() {
return (CS2ASCGPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static CS2ASCGPackage getPackage() {
return CS2ASCGPackage.eINSTANCE;
}
} //CS2ASCGFactoryImpl