/** * <copyright> * * Copyright (c) 2010 SAP AG. * 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: * Reiner Hille-Doering (SAP AG) - initial API and implementation and/or initial documentation * * </copyright> */ package org.eclipse.dd.dc.impl; import org.eclipse.dd.dc.*; 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; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class DcFactoryImpl extends EFactoryImpl implements DcFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static DcFactory init() { try { DcFactory theDcFactory = (DcFactory) EPackage.Registry.INSTANCE .getEFactory("http://www.omg.org/spec/DD/20100524/DC-XMI"); if (theDcFactory != null) { return theDcFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new DcFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DcFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case DcPackage.DOCUMENT_ROOT: return createDocumentRoot(); case DcPackage.BOUNDS: return createBounds(); case DcPackage.FONT: return createFont(); case DcPackage.POINT: return createPoint(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DocumentRoot createDocumentRoot() { DocumentRootImpl documentRoot = new DocumentRootImpl(); return documentRoot; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Bounds createBounds() { BoundsImpl bounds = new BoundsImpl(); return bounds; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Font createFont() { FontImpl font = new FontImpl(); return font; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Point createPoint() { PointImpl point = new PointImpl(); return point; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public DcPackage getDcPackage() { return (DcPackage) getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static DcPackage getPackage() { return DcPackage.eINSTANCE; } } //DcFactoryImpl