| /** |
| */ |
| package org.eclipse.fx.xtext.statemachine.statemachine.impl; |
| |
| 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; |
| |
| import org.eclipse.fx.xtext.statemachine.statemachine.*; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class StatemachineFactoryImpl extends EFactoryImpl implements StatemachineFactory |
| { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static StatemachineFactory init() |
| { |
| try |
| { |
| StatemachineFactory theStatemachineFactory = (StatemachineFactory)EPackage.Registry.INSTANCE.getEFactory(StatemachinePackage.eNS_URI); |
| if (theStatemachineFactory != null) |
| { |
| return theStatemachineFactory; |
| } |
| } |
| catch (Exception exception) |
| { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new StatemachineFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public StatemachineFactoryImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) |
| { |
| switch (eClass.getClassifierID()) |
| { |
| case StatemachinePackage.STATEMACHINE: return createStatemachine(); |
| case StatemachinePackage.SIGNAL: return createSignal(); |
| case StatemachinePackage.INPUT_SIGNAL: return createInputSignal(); |
| case StatemachinePackage.OUTPUT_SIGNAL: return createOutputSignal(); |
| case StatemachinePackage.STATE: return createState(); |
| case StatemachinePackage.TRANSITION: return createTransition(); |
| case StatemachinePackage.CONDITION: return createCondition(); |
| case StatemachinePackage.EVENT: return createEvent(); |
| case StatemachinePackage.COMMAND: return createCommand(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Statemachine createStatemachine() |
| { |
| StatemachineImpl statemachine = new StatemachineImpl(); |
| return statemachine; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Signal createSignal() |
| { |
| SignalImpl signal = new SignalImpl(); |
| return signal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public InputSignal createInputSignal() |
| { |
| InputSignalImpl inputSignal = new InputSignalImpl(); |
| return inputSignal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public OutputSignal createOutputSignal() |
| { |
| OutputSignalImpl outputSignal = new OutputSignalImpl(); |
| return outputSignal; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public State createState() |
| { |
| StateImpl state = new StateImpl(); |
| return state; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Transition createTransition() |
| { |
| TransitionImpl transition = new TransitionImpl(); |
| return transition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Condition createCondition() |
| { |
| ConditionImpl condition = new ConditionImpl(); |
| return condition; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Event createEvent() |
| { |
| EventImpl event = new EventImpl(); |
| return event; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public Command createCommand() |
| { |
| CommandImpl command = new CommandImpl(); |
| return command; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public StatemachinePackage getStatemachinePackage() |
| { |
| return (StatemachinePackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static StatemachinePackage getPackage() |
| { |
| return StatemachinePackage.eINSTANCE; |
| } |
| |
| } //StatemachineFactoryImpl |