/** */ package hu.bme.mit.inf.dslreasoner.alloyLanguage.impl; import hu.bme.mit.inf.dslreasoner.alloyLanguage.*; 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 AlloyLanguageFactoryImpl extends EFactoryImpl implements AlloyLanguageFactory { /** * Creates the default factory implementation. * * * @generated */ public static AlloyLanguageFactory init() { try { AlloyLanguageFactory theAlloyLanguageFactory = (AlloyLanguageFactory)EPackage.Registry.INSTANCE.getEFactory(AlloyLanguagePackage.eNS_URI); if (theAlloyLanguageFactory != null) { return theAlloyLanguageFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new AlloyLanguageFactoryImpl(); } /** * Creates an instance of the factory. * * * @generated */ public AlloyLanguageFactoryImpl() { super(); } /** * * * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case AlloyLanguagePackage.ALS_DOCUMENT: return createALSDocument(); case AlloyLanguagePackage.ALS_RELATION_DECLARATION: return createALSRelationDeclaration(); case AlloyLanguagePackage.ALS_TYPE_DECLARATION: return createALSTypeDeclaration(); case AlloyLanguagePackage.ALS_ENUM_DECLARATION: return createALSEnumDeclaration(); case AlloyLanguagePackage.ALS_ENUM_LITERAL: return createALSEnumLiteral(); case AlloyLanguagePackage.ALS_SIGNATURE_DECLARATION: return createALSSignatureDeclaration(); case AlloyLanguagePackage.ALS_SIGNATURE_BODY: return createALSSignatureBody(); case AlloyLanguagePackage.ALS_FIELD_DECLARATION: return createALSFieldDeclaration(); case AlloyLanguagePackage.ALS_DEFINITION: return createALSDefinition(); case AlloyLanguagePackage.ALS_FUNCTION_DEFINITION: return createALSFunctionDefinition(); case AlloyLanguagePackage.ALS_RELATION_DEFINITION: return createALSRelationDefinition(); case AlloyLanguagePackage.ALS_FACT_DECLARATION: return createALSFactDeclaration(); case AlloyLanguagePackage.ALS_TERM: return createALSTerm(); case AlloyLanguagePackage.ALS_VARIABLE_DECLARATION: return createALSVariableDeclaration(); case AlloyLanguagePackage.ALS_RUN_COMMAND: return createALSRunCommand(); case AlloyLanguagePackage.ALS_TYPE_SCOPE: return createALSTypeScope(); case AlloyLanguagePackage.ALS_SIG_SCOPE: return createALSSigScope(); case AlloyLanguagePackage.ALS_INT_SCOPE: return createALSIntScope(); case AlloyLanguagePackage.ALS_QUANTIFIED_EX: return createALSQuantifiedEx(); case AlloyLanguagePackage.ALS_OR: return createALSOr(); case AlloyLanguagePackage.ALS_IFF: return createALSIff(); case AlloyLanguagePackage.ALS_IMPL: return createALSImpl(); case AlloyLanguagePackage.ALS_AND: return createALSAnd(); case AlloyLanguagePackage.ALS_EQUALS: return createALSEquals(); case AlloyLanguagePackage.ALS_NOT_EQUALS: return createALSNotEquals(); case AlloyLanguagePackage.ALS_SUBSET: return createALSSubset(); case AlloyLanguagePackage.ALS_LESS: return createALSLess(); case AlloyLanguagePackage.ALS_LEQ: return createALSLeq(); case AlloyLanguagePackage.ALS_MORE: return createALSMore(); case AlloyLanguagePackage.ALS_MEQ: return createALSMeq(); case AlloyLanguagePackage.ALS_OVERRIDE: return createALSOverride(); case AlloyLanguagePackage.ALS_RANGE_RESTRICTION_RIGHT: return createALSRangeRestrictionRight(); case AlloyLanguagePackage.ALS_RANGE_RESTRICTION_LEFT: return createALSRangeRestrictionLeft(); case AlloyLanguagePackage.ALS_JOIN: return createALSJoin(); case AlloyLanguagePackage.ALS_MINUS: return createALSMinus(); case AlloyLanguagePackage.ALS_PLUS: return createALSPlus(); case AlloyLanguagePackage.ALS_INTERSECTION: return createALSIntersection(); case AlloyLanguagePackage.ALS_DIRECT_PRODUCT: return createALSDirectProduct(); case AlloyLanguagePackage.ALS_NOT: return createALSNot(); case AlloyLanguagePackage.ALS_INVERSE_RELATION: return createALSInverseRelation(); case AlloyLanguagePackage.AL_STRANSITIVE_CLOSURE: return createAlSTransitiveClosure(); case AlloyLanguagePackage.ALS_REFLECTIVE_TRANSITIVE_CLOSURE: return createALSReflectiveTransitiveClosure(); case AlloyLanguagePackage.ALS_CARDINALITY: return createALSCardinality(); case AlloyLanguagePackage.ALS_UNARY_MINUS: return createALSUnaryMinus(); case AlloyLanguagePackage.ALS_SUM: return createALSSum(); case AlloyLanguagePackage.ALS_FUNCTION_CALL: return createALSFunctionCall(); case AlloyLanguagePackage.ALS_NONE: return createALSNone(); case AlloyLanguagePackage.ALS_IDEN: return createALSIden(); case AlloyLanguagePackage.ALS_UNIV: return createALSUniv(); case AlloyLanguagePackage.ALS_INT: return createALSInt(); case AlloyLanguagePackage.ALS_REFERENCE: return createALSReference(); case AlloyLanguagePackage.ALS_NUMBER_LITERAL: return createALSNumberLiteral(); 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 AlloyLanguagePackage.ALS_MULTIPLICITY: return createALSMultiplicityFromString(eDataType, initialValue); case AlloyLanguagePackage.ALS_NUMERIC_OPERATOR: return createALSNumericOperatorFromString(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 AlloyLanguagePackage.ALS_MULTIPLICITY: return convertALSMultiplicityToString(eDataType, instanceValue); case AlloyLanguagePackage.ALS_NUMERIC_OPERATOR: return convertALSNumericOperatorToString(eDataType, instanceValue); default: throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier"); } } /** * * * @generated */ public ALSDocument createALSDocument() { ALSDocumentImpl alsDocument = new ALSDocumentImpl(); return alsDocument; } /** * * * @generated */ public ALSRelationDeclaration createALSRelationDeclaration() { ALSRelationDeclarationImpl alsRelationDeclaration = new ALSRelationDeclarationImpl(); return alsRelationDeclaration; } /** * * * @generated */ public ALSTypeDeclaration createALSTypeDeclaration() { ALSTypeDeclarationImpl alsTypeDeclaration = new ALSTypeDeclarationImpl(); return alsTypeDeclaration; } /** * * * @generated */ public ALSEnumDeclaration createALSEnumDeclaration() { ALSEnumDeclarationImpl alsEnumDeclaration = new ALSEnumDeclarationImpl(); return alsEnumDeclaration; } /** * * * @generated */ public ALSEnumLiteral createALSEnumLiteral() { ALSEnumLiteralImpl alsEnumLiteral = new ALSEnumLiteralImpl(); return alsEnumLiteral; } /** * * * @generated */ public ALSSignatureDeclaration createALSSignatureDeclaration() { ALSSignatureDeclarationImpl alsSignatureDeclaration = new ALSSignatureDeclarationImpl(); return alsSignatureDeclaration; } /** * * * @generated */ public ALSSignatureBody createALSSignatureBody() { ALSSignatureBodyImpl alsSignatureBody = new ALSSignatureBodyImpl(); return alsSignatureBody; } /** * * * @generated */ public ALSFieldDeclaration createALSFieldDeclaration() { ALSFieldDeclarationImpl alsFieldDeclaration = new ALSFieldDeclarationImpl(); return alsFieldDeclaration; } /** * * * @generated */ public ALSDefinition createALSDefinition() { ALSDefinitionImpl alsDefinition = new ALSDefinitionImpl(); return alsDefinition; } /** * * * @generated */ public ALSFunctionDefinition createALSFunctionDefinition() { ALSFunctionDefinitionImpl alsFunctionDefinition = new ALSFunctionDefinitionImpl(); return alsFunctionDefinition; } /** * * * @generated */ public ALSRelationDefinition createALSRelationDefinition() { ALSRelationDefinitionImpl alsRelationDefinition = new ALSRelationDefinitionImpl(); return alsRelationDefinition; } /** * * * @generated */ public ALSFactDeclaration createALSFactDeclaration() { ALSFactDeclarationImpl alsFactDeclaration = new ALSFactDeclarationImpl(); return alsFactDeclaration; } /** * * * @generated */ public ALSTerm createALSTerm() { ALSTermImpl alsTerm = new ALSTermImpl(); return alsTerm; } /** * * * @generated */ public ALSVariableDeclaration createALSVariableDeclaration() { ALSVariableDeclarationImpl alsVariableDeclaration = new ALSVariableDeclarationImpl(); return alsVariableDeclaration; } /** * * * @generated */ public ALSRunCommand createALSRunCommand() { ALSRunCommandImpl alsRunCommand = new ALSRunCommandImpl(); return alsRunCommand; } /** * * * @generated */ public ALSTypeScope createALSTypeScope() { ALSTypeScopeImpl alsTypeScope = new ALSTypeScopeImpl(); return alsTypeScope; } /** * * * @generated */ public ALSSigScope createALSSigScope() { ALSSigScopeImpl alsSigScope = new ALSSigScopeImpl(); return alsSigScope; } /** * * * @generated */ public ALSIntScope createALSIntScope() { ALSIntScopeImpl alsIntScope = new ALSIntScopeImpl(); return alsIntScope; } /** * * * @generated */ public ALSQuantifiedEx createALSQuantifiedEx() { ALSQuantifiedExImpl alsQuantifiedEx = new ALSQuantifiedExImpl(); return alsQuantifiedEx; } /** * * * @generated */ public ALSOr createALSOr() { ALSOrImpl alsOr = new ALSOrImpl(); return alsOr; } /** * * * @generated */ public ALSIff createALSIff() { ALSIffImpl alsIff = new ALSIffImpl(); return alsIff; } /** * * * @generated */ public ALSImpl createALSImpl() { ALSImplImpl alsImpl = new ALSImplImpl(); return alsImpl; } /** * * * @generated */ public ALSAnd createALSAnd() { ALSAndImpl alsAnd = new ALSAndImpl(); return alsAnd; } /** * * * @generated */ public ALSEquals createALSEquals() { ALSEqualsImpl alsEquals = new ALSEqualsImpl(); return alsEquals; } /** * * * @generated */ public ALSNotEquals createALSNotEquals() { ALSNotEqualsImpl alsNotEquals = new ALSNotEqualsImpl(); return alsNotEquals; } /** * * * @generated */ public ALSSubset createALSSubset() { ALSSubsetImpl alsSubset = new ALSSubsetImpl(); return alsSubset; } /** * * * @generated */ public ALSLess createALSLess() { ALSLessImpl alsLess = new ALSLessImpl(); return alsLess; } /** * * * @generated */ public ALSLeq createALSLeq() { ALSLeqImpl alsLeq = new ALSLeqImpl(); return alsLeq; } /** * * * @generated */ public ALSMore createALSMore() { ALSMoreImpl alsMore = new ALSMoreImpl(); return alsMore; } /** * * * @generated */ public ALSMeq createALSMeq() { ALSMeqImpl alsMeq = new ALSMeqImpl(); return alsMeq; } /** * * * @generated */ public ALSOverride createALSOverride() { ALSOverrideImpl alsOverride = new ALSOverrideImpl(); return alsOverride; } /** * * * @generated */ public ALSRangeRestrictionRight createALSRangeRestrictionRight() { ALSRangeRestrictionRightImpl alsRangeRestrictionRight = new ALSRangeRestrictionRightImpl(); return alsRangeRestrictionRight; } /** * * * @generated */ public ALSRangeRestrictionLeft createALSRangeRestrictionLeft() { ALSRangeRestrictionLeftImpl alsRangeRestrictionLeft = new ALSRangeRestrictionLeftImpl(); return alsRangeRestrictionLeft; } /** * * * @generated */ public ALSJoin createALSJoin() { ALSJoinImpl alsJoin = new ALSJoinImpl(); return alsJoin; } /** * * * @generated */ public ALSMinus createALSMinus() { ALSMinusImpl alsMinus = new ALSMinusImpl(); return alsMinus; } /** * * * @generated */ public ALSPlus createALSPlus() { ALSPlusImpl alsPlus = new ALSPlusImpl(); return alsPlus; } /** * * * @generated */ public ALSIntersection createALSIntersection() { ALSIntersectionImpl alsIntersection = new ALSIntersectionImpl(); return alsIntersection; } /** * * * @generated */ public ALSDirectProduct createALSDirectProduct() { ALSDirectProductImpl alsDirectProduct = new ALSDirectProductImpl(); return alsDirectProduct; } /** * * * @generated */ public ALSNot createALSNot() { ALSNotImpl alsNot = new ALSNotImpl(); return alsNot; } /** * * * @generated */ public ALSInverseRelation createALSInverseRelation() { ALSInverseRelationImpl alsInverseRelation = new ALSInverseRelationImpl(); return alsInverseRelation; } /** * * * @generated */ public AlSTransitiveClosure createAlSTransitiveClosure() { AlSTransitiveClosureImpl alSTransitiveClosure = new AlSTransitiveClosureImpl(); return alSTransitiveClosure; } /** * * * @generated */ public ALSReflectiveTransitiveClosure createALSReflectiveTransitiveClosure() { ALSReflectiveTransitiveClosureImpl alsReflectiveTransitiveClosure = new ALSReflectiveTransitiveClosureImpl(); return alsReflectiveTransitiveClosure; } /** * * * @generated */ public ALSCardinality createALSCardinality() { ALSCardinalityImpl alsCardinality = new ALSCardinalityImpl(); return alsCardinality; } /** * * * @generated */ public ALSUnaryMinus createALSUnaryMinus() { ALSUnaryMinusImpl alsUnaryMinus = new ALSUnaryMinusImpl(); return alsUnaryMinus; } /** * * * @generated */ public ALSSum createALSSum() { ALSSumImpl alsSum = new ALSSumImpl(); return alsSum; } /** * * * @generated */ public ALSFunctionCall createALSFunctionCall() { ALSFunctionCallImpl alsFunctionCall = new ALSFunctionCallImpl(); return alsFunctionCall; } /** * * * @generated */ public ALSNone createALSNone() { ALSNoneImpl alsNone = new ALSNoneImpl(); return alsNone; } /** * * * @generated */ public ALSIden createALSIden() { ALSIdenImpl alsIden = new ALSIdenImpl(); return alsIden; } /** * * * @generated */ public ALSUniv createALSUniv() { ALSUnivImpl alsUniv = new ALSUnivImpl(); return alsUniv; } /** * * * @generated */ public ALSInt createALSInt() { ALSIntImpl alsInt = new ALSIntImpl(); return alsInt; } /** * * * @generated */ public ALSReference createALSReference() { ALSReferenceImpl alsReference = new ALSReferenceImpl(); return alsReference; } /** * * * @generated */ public ALSNumberLiteral createALSNumberLiteral() { ALSNumberLiteralImpl alsNumberLiteral = new ALSNumberLiteralImpl(); return alsNumberLiteral; } /** * * * @generated */ public ALSMultiplicity createALSMultiplicityFromString(EDataType eDataType, String initialValue) { ALSMultiplicity result = ALSMultiplicity.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; } /** * * * @generated */ public String convertALSMultiplicityToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } /** * * * @generated */ public ALSNumericOperator createALSNumericOperatorFromString(EDataType eDataType, String initialValue) { ALSNumericOperator result = ALSNumericOperator.get(initialValue); if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'"); return result; } /** * * * @generated */ public String convertALSNumericOperatorToString(EDataType eDataType, Object instanceValue) { return instanceValue == null ? null : instanceValue.toString(); } /** * * * @generated */ public AlloyLanguagePackage getAlloyLanguagePackage() { return (AlloyLanguagePackage)getEPackage(); } /** * * * @deprecated * @generated */ @Deprecated public static AlloyLanguagePackage getPackage() { return AlloyLanguagePackage.eINSTANCE; } } //AlloyLanguageFactoryImpl