/** * Copyright (c) 2012-2016 Marsha Chechik, Alessio Di Sandro, Michalis Famelis, * Rick Salay. * 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: * Alessio Di Sandro - Implementation. */ package edu.toronto.cs.se.modelepedia.graph_mavo.impl; import edu.toronto.cs.se.modelepedia.graph_mavo.*; 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 Graph_MAVOFactoryImpl extends EFactoryImpl implements Graph_MAVOFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static Graph_MAVOFactory init() { try { Graph_MAVOFactory theGraph_MAVOFactory = (Graph_MAVOFactory)EPackage.Registry.INSTANCE.getEFactory(Graph_MAVOPackage.eNS_URI); if (theGraph_MAVOFactory != null) { return theGraph_MAVOFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new Graph_MAVOFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Graph_MAVOFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case Graph_MAVOPackage.GRAPH: return createGraph(); case Graph_MAVOPackage.NAMED_ELEMENT: return createNamedElement(); case Graph_MAVOPackage.NODE: return createNode(); case Graph_MAVOPackage.EDGE: return createEdge(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Graph createGraph() { GraphImpl graph = new GraphImpl(); return graph; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public NamedElement createNamedElement() { NamedElementImpl namedElement = new NamedElementImpl(); return namedElement; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Node createNode() { NodeImpl node = new NodeImpl(); return node; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Edge createEdge() { EdgeImpl edge = new EdgeImpl(); return edge; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public Graph_MAVOPackage getGraph_MAVOPackage() { return (Graph_MAVOPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static Graph_MAVOPackage getPackage() { return Graph_MAVOPackage.eINSTANCE; } } //Graph_MAVOFactoryImpl