/** */ package hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.impl; import hu.bme.mit.inf.dslreasoner.domains.yakindu.sgraph.yakindumm.*; import org.eclipse.emf.ecore.EClass; import org.eclipse.emf.ecore.EDataType; 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; /** * * An implementation of the model Factory. * * @generated */ public class YakindummFactoryImpl extends EFactoryImpl implements YakindummFactory { /** * Creates the default factory implementation. * * * @generated */ public static YakindummFactory init() { try { YakindummFactory theYakindummFactory = (YakindummFactory)EPackage.Registry.INSTANCE.getEFactory(YakindummPackage.eNS_URI); if (theYakindummFactory != null) { return theYakindummFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new YakindummFactoryImpl(); } /** * Creates an instance of the factory. * * * @generated */ public YakindummFactoryImpl() { super(); } /** * * * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case YakindummPackage.REGION: return createRegion(); case YakindummPackage.TRANSITION: return createTransition(); case YakindummPackage.STATECHART: return createStatechart(); case YakindummPackage.ENTRY: return createEntry(); case YakindummPackage.SYNCHRONIZATION: return createSynchronization(); case YakindummPackage.STATE: return createState(); case YakindummPackage.CHOICE: return createChoice(); case YakindummPackage.EXIT: return createExit(); case YakindummPackage.FINAL_STATE: return createFinalState(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * * * @generated */ @Override public Object createFromString(EDataType eDataType, String initialValue) { switch (eDataType.getClassifierID()) { case YakindummPackage.ENTRY_TYPE: return createEntryTypeFromString(eDataType, initialValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } } /** * * * @generated */ @Override public String convertToString(EDataType eDataType, Object instanceValue) { switch (eDataType.getClassifierID()) { case YakindummPackage.ENTRY_TYPE: return convertEntryTypeToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } } /** * * * @generated */ public Region createRegion() { RegionImpl region = new RegionImpl(); return region; } /** * * * @generated */ public Transition createTransition() { TransitionImpl transition = new TransitionImpl(); return transition; } /** * * * @generated */ public Statechart createStatechart() { StatechartImpl statechart = new StatechartImpl(); return statechart; } /** * * * @generated */ public Entry createEntry() { EntryImpl entry = new EntryImpl(); return entry; } /** * * * @generated */ public Synchronization createSynchronization() { SynchronizationImpl synchronization = new SynchronizationImpl(); return synchronization; } /** * * * @generated */ public State createState() { StateImpl state = new StateImpl(); return state; } /** * * * @generated */ public Choice createChoice() { ChoiceImpl choice = new ChoiceImpl(); return choice; } /** * * * @generated */ public Exit createExit() { ExitImpl exit = new ExitImpl(); return exit; } /** * * * @generated */ public FinalState createFinalState() { FinalStateImpl finalState = new FinalStateImpl(); return finalState; } /** * * * @generated */ public EntryType createEntryTypeFromString(EDataType eDataType, String initialValue) { EntryType result = EntryType.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; } /** * * * @generated */ public String convertEntryTypeToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } /** * * * @generated */ public YakindummPackage getYakindummPackage() { return (YakindummPackage)getEPackage(); } /** * * * @deprecated * @generated */ @Deprecated public static YakindummPackage getPackage() { return YakindummPackage.eINSTANCE; } } //YakindummFactoryImpl