/**
* <copyright>
* </copyright>
*
* $Id$
*/
package SAG.impl;
import SAG.*;
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 SAGFactoryImpl extends EFactoryImpl implements SAGFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static SAGFactory init() {
try {
SAGFactory theSAGFactory = (SAGFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.amcl.tuc.gr/aseme/metamodels/SAG");
if (theSAGFactory != null) {
return theSAGFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new SAGFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SAGFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case SAGPackage.SA_GMODEL: return createSAGmodel();
case SAGPackage.ACTOR: return createActor();
case SAGPackage.GOAL: return createGoal();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SAGmodel createSAGmodel() {
SAGmodelImpl saGmodel = new SAGmodelImpl();
return saGmodel;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Actor createActor() {
ActorImpl actor = new ActorImpl();
return actor;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Goal createGoal() {
GoalImpl goal = new GoalImpl();
return goal;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SAGPackage getSAGPackage() {
return (SAGPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static SAGPackage getPackage() {
return SAGPackage.eINSTANCE;
}
} //SAGFactoryImpl