/** * Copyright (c) 2009 Bestsolution.at 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<tom.schindl@bestsolution.at> - Initial API and implementation */ package org.eclipse.emf.examples.databinding.project.core.model.project.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.examples.databinding.project.core.model.project.*; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class ProjectFactoryImpl extends EFactoryImpl implements ProjectFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ProjectFactory init() { try { ProjectFactory theProjectFactory = (ProjectFactory)EPackage.Registry.INSTANCE.getEFactory(ProjectPackage.eNS_URI); if (theProjectFactory != null) { return theProjectFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ProjectFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ProjectFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case ProjectPackage.FOUNDATION: return createFoundation(); case ProjectPackage.PROJECT: return createProject(); case ProjectPackage.COMMITTER_SHIP: return createCommitterShip(); case ProjectPackage.PERSON: return createPerson(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Foundation createFoundation() { FoundationImpl foundation = new FoundationImpl(); return foundation; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Project createProject() { ProjectImpl project = new ProjectImpl(); return project; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public CommitterShip createCommitterShip() { CommitterShipImpl committerShip = new CommitterShipImpl(); return committerShip; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Person createPerson() { PersonImpl person = new PersonImpl(); return person; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ProjectPackage getProjectPackage() { return (ProjectPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static ProjectPackage getPackage() { return ProjectPackage.eINSTANCE; } } //ProjectFactoryImpl