| /** |
| */ |
| package SampleModel.impl; |
| |
| import SampleModel.Label; |
| import SampleModel.Memory; |
| import SampleModel.Model; |
| import SampleModel.SampleModelFactory; |
| import SampleModel.SampleModelPackage; |
| import SampleModel.Scheduler; |
| |
| 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 SampleModelFactoryImpl extends EFactoryImpl implements SampleModelFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static SampleModelFactory init() { |
| try { |
| SampleModelFactory theSampleModelFactory = (SampleModelFactory)EPackage.Registry.INSTANCE.getEFactory(SampleModelPackage.eNS_URI); |
| if (theSampleModelFactory != null) { |
| return theSampleModelFactory; |
| } |
| } |
| catch (Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new SampleModelFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SampleModelFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case SampleModelPackage.MODEL: return createModel(); |
| case SampleModelPackage.RUNNABLE: return createRunnable(); |
| case SampleModelPackage.LABEL: return createLabel(); |
| case SampleModelPackage.MEMORY: return createMemory(); |
| case SampleModelPackage.SCHEDULER: return createScheduler(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Model createModel() { |
| ModelImpl model = new ModelImpl(); |
| return model; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SampleModel.Runnable createRunnable() { |
| RunnableImpl runnable = new RunnableImpl(); |
| return runnable; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Label createLabel() { |
| LabelImpl label = new LabelImpl(); |
| return label; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Memory createMemory() { |
| MemoryImpl memory = new MemoryImpl(); |
| return memory; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Scheduler createScheduler() { |
| SchedulerImpl scheduler = new SchedulerImpl(); |
| return scheduler; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public SampleModelPackage getSampleModelPackage() { |
| return (SampleModelPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static SampleModelPackage getPackage() { |
| return SampleModelPackage.eINSTANCE; |
| } |
| |
| } //SampleModelFactoryImpl |