blob: 930d2bc3b07c71121538ecf73e597383fa44369c [file] [log] [blame]
/**
* Copyright (c) 2017 CEA LIST. 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 a; http://www.eclipse.org/legal/epl-v10.html Contributors: - Initial API and implementation Yupanqui Munoz Julho (CEA LIST) - Initial API and implementation
*/
package org.eclipse.papyrus.requirements.sysml.papyrusre.papyrusre.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.papyrus.requirements.sysml.papyrusre.papyrusre.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class PapyrusREFactoryImpl extends EFactoryImpl implements PapyrusREFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static PapyrusREFactory init() {
try {
PapyrusREFactory thePapyrusREFactory = (PapyrusREFactory)EPackage.Registry.INSTANCE.getEFactory(PapyrusREPackage.eNS_URI);
if (thePapyrusREFactory != null) {
return thePapyrusREFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new PapyrusREFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PapyrusREFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case PapyrusREPackage.DUMMY_STEREOTYPE: return createDummyStereotype();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public DummyStereotype createDummyStereotype() {
DummyStereotypeImpl dummyStereotype = new DummyStereotypeImpl();
return dummyStereotype;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public PapyrusREPackage getPapyrusREPackage() {
return (PapyrusREPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static PapyrusREPackage getPackage() {
return PapyrusREPackage.eINSTANCE;
}
} //PapyrusREFactoryImpl