blob: 9ffe036bf8f00071fc22caba8600beca0480e5ce [file] [log] [blame]
/**
*
O * Copyright (c) 2009-2010 Thales Corporate Services S.A.S.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-v2.0
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Thales Corporate Services S.A.S - initial API and implementation
*
*/
package org.eclipse.egf.model.mapping.impl;
import org.eclipse.egf.model.mapping.MappingDomain;
import org.eclipse.egf.model.mapping.MappingFactory;
import org.eclipse.egf.model.mapping.MappingPackage;
import org.eclipse.egf.model.mapping.MappingViewpoint;
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;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class MappingFactoryImpl extends EFactoryImpl implements MappingFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static MappingFactory init() {
try {
MappingFactory theMappingFactory = (MappingFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/egf/1.0.0/mapping"); //$NON-NLS-1$
if (theMappingFactory != null) {
return theMappingFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new MappingFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case MappingPackage.MAPPING_VIEWPOINT:
return createMappingViewpoint();
case MappingPackage.MAPPING_DOMAIN:
return createMappingDomain();
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
*/
public MappingViewpoint createMappingViewpoint() {
MappingViewpointImpl mappingViewpoint = new MappingViewpointImpl();
return mappingViewpoint;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingDomain createMappingDomain() {
MappingDomainImpl mappingDomain = new MappingDomainImpl();
return mappingDomain;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingPackage getMappingPackage() {
return (MappingPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static MappingPackage getPackage() {
return MappingPackage.eINSTANCE;
}
} // MappingFactoryImpl