/**
* Copyright (c) 2009 BestSolution and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* Tom Schindl - Initial API and implementation
*/
package org.eclipse.emf.test.databinding.emfdb.impl;
import java.util.Map;
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.test.databinding.emfdb.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class EmfdbFactoryImpl extends EFactoryImpl implements EmfdbFactory
{
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static EmfdbFactory init()
{
try
{
EmfdbFactory theEmfdbFactory = (EmfdbFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/emf/emfdb/1.0.0");
if (theEmfdbFactory != null)
{
return theEmfdbFactory;
}
}
catch (Exception exception)
{
EcorePlugin.INSTANCE.log(exception);
}
return new EmfdbFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EmfdbFactoryImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass)
{
switch (eClass.getClassifierID())
{
case EmfdbPackage.A: return createA();
case EmfdbPackage.B: return createB();
case EmfdbPackage.C: return (EObject)createC();
case EmfdbPackage.D: return createD();
case EmfdbPackage.E: return createE();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public A createA()
{
AImpl a = new AImpl();
return a;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public B createB()
{
BImpl b = new BImpl();
return b;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Map.Entry<String, String> createC()
{
CImpl c = new CImpl();
return c;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public D createD()
{
DImpl d = new DImpl();
return d;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public E createE()
{
EImpl e = new EImpl();
return e;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EmfdbPackage getEmfdbPackage()
{
return (EmfdbPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static EmfdbPackage getPackage()
{
return EmfdbPackage.eINSTANCE;
}
} //EmfdbFactoryImpl