blob: 14664ed57de1ebf238f21c0ea7db32fb4af9b9fe [file] [log] [blame]
/**
* Copyright (c) 2011-2013 EclipseSource Muenchen GmbH and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
*/
package org.eclipse.emf.ecp.view.edapt.util.test.model.y.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.ecp.view.edapt.util.test.model.y.EdaptTestY;
import org.eclipse.emf.ecp.view.edapt.util.test.model.y.EdaptTestYFactory;
import org.eclipse.emf.ecp.view.edapt.util.test.model.y.EdaptTestYPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
*
* @generated
*/
public class EdaptTestYFactoryImpl extends EFactoryImpl implements EdaptTestYFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public static EdaptTestYFactory init() {
try {
final EdaptTestYFactory theYFactory = (EdaptTestYFactory) EPackage.Registry.INSTANCE
.getEFactory(EdaptTestYPackage.eNS_URI);
if (theYFactory != null) {
return theYFactory;
}
} catch (final Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new EdaptTestYFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public EdaptTestYFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case EdaptTestYPackage.Y:
return createY();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public EdaptTestY createY() {
final EdaptTestYImpl y = new EdaptTestYImpl();
return y;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public EdaptTestYPackage getYPackage() {
return (EdaptTestYPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @deprecated
* @generated
*/
@Deprecated
public static EdaptTestYPackage getPackage() {
return EdaptTestYPackage.eINSTANCE;
}
} // EdaptTestYFactoryImpl