blob: 7839dcd18afbae28fcde82eb931a12c3736ef97b [file] [log] [blame]
/*****************************************************************************
* Copyright (c) 2013, 2014 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 at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
*****************************************************************************/
package org.eclipse.papyrus.interoperability.rsa.profilebase.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.interoperability.rsa.profilebase.ProfileBaseFactory;
import org.eclipse.papyrus.interoperability.rsa.profilebase.ProfileBasePackage;
import org.eclipse.papyrus.interoperability.rsa.profilebase.ProfileConstraint;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
*
* @generated
*/
public class ProfileBaseFactoryImpl extends EFactoryImpl implements ProfileBaseFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public static ProfileBaseFactory init() {
try {
ProfileBaseFactory theProfileBaseFactory = (ProfileBaseFactory) EPackage.Registry.INSTANCE.getEFactory(ProfileBasePackage.eNS_URI);
if (theProfileBaseFactory != null) {
return theProfileBaseFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ProfileBaseFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public ProfileBaseFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ProfileBasePackage.PROFILE_CONSTRAINT:
return createProfileConstraint();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public ProfileConstraint createProfileConstraint() {
ProfileConstraintImpl profileConstraint = new ProfileConstraintImpl();
return profileConstraint;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public ProfileBasePackage getProfileBasePackage() {
return (ProfileBasePackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @deprecated
* @generated
*/
@Deprecated
public static ProfileBasePackage getPackage() {
return ProfileBasePackage.eINSTANCE;
}
} // ProfileBaseFactoryImpl