blob: b5c6dba51567b4258151ec38ee46e9b0b5ff6c44 [file] [log] [blame]
/**
* Copyright (c) 2016 Willink Transformations and others.
* 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:
* E.D.Willink - Initial API and implementation
*/
package org.eclipse.qvtd.xtext.qvtcore.tests.list2list.doublylinkedlist.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.qvtd.xtext.qvtcore.tests.list2list.doublylinkedlist.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class DoublylinkedlistFactoryImpl extends EFactoryImpl implements DoublylinkedlistFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static DoublylinkedlistFactory init() {
try {
DoublylinkedlistFactory theDoublylinkedlistFactory = (DoublylinkedlistFactory)EPackage.Registry.INSTANCE.getEFactory(DoublylinkedlistPackage.eNS_URI);
if (theDoublylinkedlistFactory != null) {
return theDoublylinkedlistFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new DoublylinkedlistFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public DoublylinkedlistFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case DoublylinkedlistPackage.ELEMENT: return createElement();
case DoublylinkedlistPackage.DOUBLY_LINKED_LIST: return createDoublyLinkedList();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Element createElement() {
ElementImpl element = new ElementImpl();
return element;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public DoublyLinkedList createDoublyLinkedList() {
DoublyLinkedListImpl doublyLinkedList = new DoublyLinkedListImpl();
return doublyLinkedList;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public DoublylinkedlistPackage getDoublylinkedlistPackage() {
return (DoublylinkedlistPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static DoublylinkedlistPackage getPackage() {
return DoublylinkedlistPackage.eINSTANCE;
}
} //DoublylinkedlistFactoryImpl