blob: bafcc3255c478e008bae8af9e3081cfd3b98c17f [file] [log] [blame]
/**
* Copyright (c) 2019 CEA LIST.
*
* 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:
* Nicolas FAUVERGUE (CEA LIST) nicolas.fauvergue@cea.fr - Initial API and implementation
*/
package org.eclipse.papyrus.sysml16.constraintblocks.internal.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.sysml16.constraintblocks.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class ConstraintBlocksFactoryImpl extends EFactoryImpl implements ConstraintBlocksFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static ConstraintBlocksFactory init() {
try {
ConstraintBlocksFactory theConstraintBlocksFactory = (ConstraintBlocksFactory)EPackage.Registry.INSTANCE.getEFactory(ConstraintBlocksPackage.eNS_URI);
if (theConstraintBlocksFactory != null) {
return theConstraintBlocksFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ConstraintBlocksFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ConstraintBlocksFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ConstraintBlocksPackage.CONSTRAINT_BLOCK: return createConstraintBlock();
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 ConstraintBlock createConstraintBlock() {
ConstraintBlockImpl constraintBlock = new ConstraintBlockImpl();
return constraintBlock;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ConstraintBlocksPackage getConstraintBlocksPackage() {
return (ConstraintBlocksPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static ConstraintBlocksPackage getPackage() {
return ConstraintBlocksPackage.eINSTANCE;
}
} //ConstraintBlocksFactoryImpl