/**
* <copyright>
* </copyright>
*
* $Id$
*/
package com.hundsun.ares.studio.logic.impl;
import com.hundsun.ares.studio.logic.*;
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 LogicFactoryImpl extends EFactoryImpl implements LogicFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static LogicFactory init() {
try {
LogicFactory theLogicFactory = (LogicFactory)EPackage.Registry.INSTANCE.getEFactory(LogicPackage.eNS_URI);
if (theLogicFactory != null) {
return theLogicFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new LogicFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LogicFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case LogicPackage.LOGIC_FUNCTION: return createLogicFunction();
case LogicPackage.LOGIC_SERVICE: return createLogicService();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LogicFunction createLogicFunction() {
LogicFunctionImpl logicFunction = new LogicFunctionImpl();
return logicFunction;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LogicService createLogicService() {
LogicServiceImpl logicService = new LogicServiceImpl();
return logicService;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LogicPackage getLogicPackage() {
return (LogicPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static LogicPackage getPackage() {
return LogicPackage.eINSTANCE;
}
} //LogicFactoryImpl