blob: 85ad2a9851352308e7c2e1f2ef365ee1e19f2ff8 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2011 Mia-Software.
* 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:
* Fabien Giquel (Mia-Software) - initial API and implementation
* Nicolas Bros (Mia-Software) - Bug 335003 - [Discoverer] : Existing Discoverers Refactoring based on new framework
*******************************************************************************/
package org.eclipse.modisco.kdm.source.extension.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.modisco.kdm.source.extension.*;
/**
* <!-- begin-user-doc --> An implementation of the model <b>Factory</b>. <!--
* end-user-doc -->
* @generated
*/
@SuppressWarnings("all")
public class ExtensionFactoryImpl extends EFactoryImpl implements
ExtensionFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
* @generated
*/
public static ExtensionFactory init() {
try {
ExtensionFactory theExtensionFactory = (ExtensionFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/MoDisco/kdmsourceextension/0.1.incubation/kdm/source/extension");
if (theExtensionFactory != null) {
return theExtensionFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ExtensionFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc --> <!--
* end-user-doc -->
* @generated
*/
public ExtensionFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case ExtensionPackage.AST_NODE_SOURCE_REGION: return createASTNodeSourceRegion();
case ExtensionPackage.CODE_UNIT2_FILE: return createCodeUnit2File();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ASTNodeSourceRegion createASTNodeSourceRegion() {
ASTNodeSourceRegionImpl astNodeSourceRegion = new ASTNodeSourceRegionImpl();
return astNodeSourceRegion;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CodeUnit2File createCodeUnit2File() {
CodeUnit2FileImpl codeUnit2File = new CodeUnit2FileImpl();
return codeUnit2File;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @generated
*/
public ExtensionPackage getExtensionPackage() {
return (ExtensionPackage)getEPackage();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static ExtensionPackage getPackage() {
return ExtensionPackage.eINSTANCE;
}
} // ExtensionFactoryImpl