blob: 6b08a6578f429b06082d028ecb08e612aab121fc [file] [log] [blame]
/**
* Copyright (c) 2021 CEA LIST, 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:
* Patrick Tessier (CEA LIST) patrick.tessier@cea.fr - Initial API and implementation
*
*/
package org.eclipse.papyrus.sysml16.elementgroup.cluster.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.elementgroup.cluster.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
*
* @generated
*/
public class ClusterFactoryImpl extends EFactoryImpl implements ClusterFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public static ClusterFactory init() {
try {
ClusterFactory theClusterFactory = (ClusterFactory) EPackage.Registry.INSTANCE.getEFactory(ClusterPackage.eNS_URI);
if (theClusterFactory != null) {
return theClusterFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ClusterFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
public ClusterFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ClusterPackage.INTENTIONAL_ELEMENT_GROUP:
return createIntentionalElementGroup();
case ClusterPackage.OPAQUE_REQUEST:
return createOpaqueRequest();
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 IntentionalElementGroup createIntentionalElementGroup() {
IntentionalElementGroupImpl intentionalElementGroup = new IntentionalElementGroupImpl();
return intentionalElementGroup;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public OpaqueRequest createOpaqueRequest() {
OpaqueRequestImpl opaqueRequest = new OpaqueRequestImpl();
return opaqueRequest;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @generated
*/
@Override
public ClusterPackage getClusterPackage() {
return (ClusterPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*
* @deprecated
* @generated
*/
@Deprecated
public static ClusterPackage getPackage() {
return ClusterPackage.eINSTANCE;
}
} // ClusterFactoryImpl