/**
* <copyright>
* </copyright>
*
* $Id$
*/
package org.eclipse.buckminster.rmap.psf.impl;
import org.eclipse.buckminster.rmap.psf.*;
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 PsfFactoryImpl extends EFactoryImpl implements PsfFactory {
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @deprecated
* @generated
*/
@Deprecated
public static PsfPackage getPackage() {
return PsfPackage.eINSTANCE;
}
/**
* Creates the default factory implementation. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
public static PsfFactory init() {
try {
PsfFactory thePsfFactory = (PsfFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/buckminster/PSFProvider-1.0");
if (thePsfFactory != null) {
return thePsfFactory;
}
} catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new PsfFactoryImpl();
}
/**
* Creates an instance of the factory. <!-- begin-user-doc --> <!--
* end-user-doc -->
*
* @generated
*/
public PsfFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case PsfPackage.PSF_PROVIDER:
return createPSFProvider();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public PSFProvider createPSFProvider() {
PSFProviderImpl psfProvider = new PSFProviderImpl();
return psfProvider;
}
/**
* <!-- begin-user-doc --> <!-- end-user-doc -->
*
* @generated
*/
@Override
public PsfPackage getPsfPackage() {
return (PsfPackage) getEPackage();
}
} // PsfFactoryImpl