/** */ package org.eclipse.gmf.tooling.examples.svg.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.gmf.tooling.examples.svg.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class SvgFactoryImpl extends EFactoryImpl implements SvgFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static SvgFactory init() { try { SvgFactory theSvgFactory = (SvgFactory)EPackage.Registry.INSTANCE.getEFactory(SvgPackage.eNS_URI); if (theSvgFactory != null) { return theSvgFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new SvgFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SvgFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case SvgPackage.PLAYGROUND: return createPlayground(); case SvgPackage.PLAYER: return createPlayer(); case SvgPackage.GOAL: return createGoal(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Playground createPlayground() { PlaygroundImpl playground = new PlaygroundImpl(); return playground; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Player createPlayer() { PlayerImpl player = new PlayerImpl(); return player; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Goal createGoal() { GoalImpl goal = new GoalImpl(); return goal; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public SvgPackage getSvgPackage() { return (SvgPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static SvgPackage getPackage() { return SvgPackage.eINSTANCE; } } //SvgFactoryImpl