124 lines
2.4 KiB
Java
124 lines
2.4 KiB
Java
/**
|
|
*/
|
|
package fr.tpt.mem4csd.loss.impl;
|
|
|
|
import fr.tpt.mem4csd.loss.*;
|
|
|
|
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 LossFactoryImpl extends EFactoryImpl implements LossFactory {
|
|
/**
|
|
* Creates the default factory implementation.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public static LossFactory init() {
|
|
try {
|
|
LossFactory theLossFactory = (LossFactory) EPackage.Registry.INSTANCE.getEFactory(LossPackage.eNS_URI);
|
|
if (theLossFactory != null) {
|
|
return theLossFactory;
|
|
}
|
|
} catch (Exception exception) {
|
|
EcorePlugin.INSTANCE.log(exception);
|
|
}
|
|
return new LossFactoryImpl();
|
|
}
|
|
|
|
/**
|
|
* Creates an instance of the factory.
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
public LossFactoryImpl() {
|
|
super();
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public EObject create(EClass eClass) {
|
|
switch (eClass.getClassifierID()) {
|
|
case LossPackage.PRIMITIVE:
|
|
return createPrimitive();
|
|
case LossPackage.LINK:
|
|
return createLink();
|
|
case LossPackage.COMPLEX:
|
|
return createComplex();
|
|
default:
|
|
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
|
|
}
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public Primitive createPrimitive() {
|
|
PrimitiveImpl primitive = new PrimitiveImpl();
|
|
return primitive;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public Link createLink() {
|
|
LinkImpl link = new LinkImpl();
|
|
return link;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public Complex createComplex() {
|
|
ComplexImpl complex = new ComplexImpl();
|
|
return complex;
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @generated
|
|
*/
|
|
@Override
|
|
public LossPackage getLossPackage() {
|
|
return (LossPackage) getEPackage();
|
|
}
|
|
|
|
/**
|
|
* <!-- begin-user-doc -->
|
|
* <!-- end-user-doc -->
|
|
* @deprecated
|
|
* @generated
|
|
*/
|
|
@Deprecated
|
|
public static LossPackage getPackage() {
|
|
return LossPackage.eINSTANCE;
|
|
}
|
|
|
|
} //LossFactoryImpl
|