blob: 4b6a6f2d2839bc7ce6e51feeee4c659607e7ff43 [file] [log] [blame]
/**
* <copyright> Copyright (c) 2008-2009 Jonas Helming, Maximilian Koegel. 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 </copyright>
*/
package org.eclipse.emf.emfstore.client.test.testmodel.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.emf.emfstore.client.test.testmodel.TestElement;
import org.eclipse.emf.emfstore.client.test.testmodel.TestmodelFactory;
import org.eclipse.emf.emfstore.client.test.testmodel.TestmodelPackage;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!-- end-user-doc -->
* @generated
*/
public class TestmodelFactoryImpl extends EFactoryImpl implements TestmodelFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public static TestmodelFactory init() {
try {
TestmodelFactory theTestmodelFactory = (TestmodelFactory)EPackage.Registry.INSTANCE.getEFactory("http://unicase.org/workspace/test/testmodel");
if (theTestmodelFactory != null) {
return theTestmodelFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new TestmodelFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public TestmodelFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case TestmodelPackage.TEST_ELEMENT: return createTestElement();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public TestElement createTestElement() {
TestElementImpl testElement = new TestElementImpl();
return testElement;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public TestmodelPackage getTestmodelPackage() {
return (TestmodelPackage)getEPackage();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static TestmodelPackage getPackage() {
return TestmodelPackage.eINSTANCE;
}
} // TestmodelFactoryImpl