blob: 4d8d9700ea8a9fcff299aa86aecf439256c1cfd4 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2018 Willink Transformations and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Adolfo Sanchez-Barbudo Herrera - initial API and implementation
*******************************************************************************/
/**
* generated by Xtext 2.10.0
*/
package org.eclipse.qvtd.doc.minioclcs.impl;
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;
import org.eclipse.qvtd.doc.minioclcs.AccVarCS;
import org.eclipse.qvtd.doc.minioclcs.BooleanExpCS;
import org.eclipse.qvtd.doc.minioclcs.BooleanLiteralExpCS;
import org.eclipse.qvtd.doc.minioclcs.CallExpCS;
import org.eclipse.qvtd.doc.minioclcs.ClassCS;
import org.eclipse.qvtd.doc.minioclcs.CollectExpCS;
import org.eclipse.qvtd.doc.minioclcs.CollectionKindCS;
import org.eclipse.qvtd.doc.minioclcs.CollectionLiteralExpCS;
import org.eclipse.qvtd.doc.minioclcs.CollectionLiteralPartCS;
import org.eclipse.qvtd.doc.minioclcs.ConstraintsDefCS;
import org.eclipse.qvtd.doc.minioclcs.EqualityExpCS;
import org.eclipse.qvtd.doc.minioclcs.ExpCS;
import org.eclipse.qvtd.doc.minioclcs.ImportCS;
import org.eclipse.qvtd.doc.minioclcs.IntLiteralExpCS;
import org.eclipse.qvtd.doc.minioclcs.InvariantCS;
import org.eclipse.qvtd.doc.minioclcs.IterateExpCS;
import org.eclipse.qvtd.doc.minioclcs.IteratorVarCS;
import org.eclipse.qvtd.doc.minioclcs.LetExpCS;
import org.eclipse.qvtd.doc.minioclcs.LetVarCS;
import org.eclipse.qvtd.doc.minioclcs.LiteralExpCS;
import org.eclipse.qvtd.doc.minioclcs.LoopExpCS;
import org.eclipse.qvtd.doc.minioclcs.MinioclcsFactory;
import org.eclipse.qvtd.doc.minioclcs.MinioclcsPackage;
import org.eclipse.qvtd.doc.minioclcs.MultiplicityCS;
import org.eclipse.qvtd.doc.minioclcs.NameExpCS;
import org.eclipse.qvtd.doc.minioclcs.NavigationExpCS;
import org.eclipse.qvtd.doc.minioclcs.NullLiteralExpCS;
import org.eclipse.qvtd.doc.minioclcs.OperationCS;
import org.eclipse.qvtd.doc.minioclcs.PackageCS;
import org.eclipse.qvtd.doc.minioclcs.ParameterCS;
import org.eclipse.qvtd.doc.minioclcs.PathElementCS;
import org.eclipse.qvtd.doc.minioclcs.PathNameCS;
import org.eclipse.qvtd.doc.minioclcs.PrimaryExpCS;
import org.eclipse.qvtd.doc.minioclcs.PropertyCS;
import org.eclipse.qvtd.doc.minioclcs.RootCS;
import org.eclipse.qvtd.doc.minioclcs.RoundedBracketClauseCS;
import org.eclipse.qvtd.doc.minioclcs.SelfExpCS;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class MinioclcsFactoryImpl extends EFactoryImpl implements MinioclcsFactory
{
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static MinioclcsFactory init()
{
try {
MinioclcsFactory theMinioclcsFactory = (MinioclcsFactory)EPackage.Registry.INSTANCE.getEFactory(MinioclcsPackage.eNS_URI);
if (theMinioclcsFactory != null) {
return theMinioclcsFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new MinioclcsFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MinioclcsFactoryImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass)
{
switch (eClass.getClassifierID()) {
case MinioclcsPackage.ROOT_CS: return createRootCS();
case MinioclcsPackage.IMPORT_CS: return createImportCS();
case MinioclcsPackage.PACKAGE_CS: return createPackageCS();
case MinioclcsPackage.CLASS_CS: return createClassCS();
case MinioclcsPackage.PROPERTY_CS: return createPropertyCS();
case MinioclcsPackage.MULTIPLICITY_CS: return createMultiplicityCS();
case MinioclcsPackage.OPERATION_CS: return createOperationCS();
case MinioclcsPackage.PARAMETER_CS: return createParameterCS();
case MinioclcsPackage.CONSTRAINTS_DEF_CS: return createConstraintsDefCS();
case MinioclcsPackage.INVARIANT_CS: return createInvariantCS();
case MinioclcsPackage.EXP_CS: return createExpCS();
case MinioclcsPackage.EQUALITY_EXP_CS: return createEqualityExpCS();
case MinioclcsPackage.CALL_EXP_CS: return createCallExpCS();
case MinioclcsPackage.PRIMARY_EXP_CS: return createPrimaryExpCS();
case MinioclcsPackage.SELF_EXP_CS: return createSelfExpCS();
case MinioclcsPackage.NAVIGATION_EXP_CS: return createNavigationExpCS();
case MinioclcsPackage.LOOP_EXP_CS: return createLoopExpCS();
case MinioclcsPackage.COLLECT_EXP_CS: return createCollectExpCS();
case MinioclcsPackage.ITERATOR_VAR_CS: return createIteratorVarCS();
case MinioclcsPackage.ITERATE_EXP_CS: return createIterateExpCS();
case MinioclcsPackage.ACC_VAR_CS: return createAccVarCS();
case MinioclcsPackage.NAME_EXP_CS: return createNameExpCS();
case MinioclcsPackage.ROUNDED_BRACKET_CLAUSE_CS: return createRoundedBracketClauseCS();
case MinioclcsPackage.LITERAL_EXP_CS: return createLiteralExpCS();
case MinioclcsPackage.INT_LITERAL_EXP_CS: return createIntLiteralExpCS();
case MinioclcsPackage.BOOLEAN_LITERAL_EXP_CS: return createBooleanLiteralExpCS();
case MinioclcsPackage.NULL_LITERAL_EXP_CS: return createNullLiteralExpCS();
case MinioclcsPackage.COLLECTION_LITERAL_EXP_CS: return createCollectionLiteralExpCS();
case MinioclcsPackage.COLLECTION_LITERAL_PART_CS: return createCollectionLiteralPartCS();
case MinioclcsPackage.LET_EXP_CS: return createLetExpCS();
case MinioclcsPackage.LET_VAR_CS: return createLetVarCS();
case MinioclcsPackage.PATH_NAME_CS: return createPathNameCS();
case MinioclcsPackage.PATH_ELEMENT_CS: return createPathElementCS();
case MinioclcsPackage.BOOLEAN_EXP_CS: return createBooleanExpCS();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue)
{
switch (eDataType.getClassifierID()) {
case MinioclcsPackage.COLLECTION_KIND_CS:
return createCollectionKindCSFromString(eDataType, initialValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue)
{
switch (eDataType.getClassifierID()) {
case MinioclcsPackage.COLLECTION_KIND_CS:
return convertCollectionKindCSToString(eDataType, instanceValue);
default:
throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RootCS createRootCS()
{
RootCSImpl rootCS = new RootCSImpl();
return rootCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ImportCS createImportCS()
{
ImportCSImpl importCS = new ImportCSImpl();
return importCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PackageCS createPackageCS()
{
PackageCSImpl packageCS = new PackageCSImpl();
return packageCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ClassCS createClassCS()
{
ClassCSImpl classCS = new ClassCSImpl();
return classCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PropertyCS createPropertyCS()
{
PropertyCSImpl propertyCS = new PropertyCSImpl();
return propertyCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MultiplicityCS createMultiplicityCS()
{
MultiplicityCSImpl multiplicityCS = new MultiplicityCSImpl();
return multiplicityCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public OperationCS createOperationCS()
{
OperationCSImpl operationCS = new OperationCSImpl();
return operationCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ParameterCS createParameterCS()
{
ParameterCSImpl parameterCS = new ParameterCSImpl();
return parameterCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ConstraintsDefCS createConstraintsDefCS()
{
ConstraintsDefCSImpl constraintsDefCS = new ConstraintsDefCSImpl();
return constraintsDefCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public InvariantCS createInvariantCS()
{
InvariantCSImpl invariantCS = new InvariantCSImpl();
return invariantCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ExpCS createExpCS()
{
ExpCSImpl expCS = new ExpCSImpl();
return expCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EqualityExpCS createEqualityExpCS()
{
EqualityExpCSImpl equalityExpCS = new EqualityExpCSImpl();
return equalityExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CallExpCS createCallExpCS()
{
CallExpCSImpl callExpCS = new CallExpCSImpl();
return callExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PrimaryExpCS createPrimaryExpCS()
{
PrimaryExpCSImpl primaryExpCS = new PrimaryExpCSImpl();
return primaryExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public SelfExpCS createSelfExpCS()
{
SelfExpCSImpl selfExpCS = new SelfExpCSImpl();
return selfExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NavigationExpCS createNavigationExpCS()
{
NavigationExpCSImpl navigationExpCS = new NavigationExpCSImpl();
return navigationExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LoopExpCS createLoopExpCS()
{
LoopExpCSImpl loopExpCS = new LoopExpCSImpl();
return loopExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CollectExpCS createCollectExpCS()
{
CollectExpCSImpl collectExpCS = new CollectExpCSImpl();
return collectExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IteratorVarCS createIteratorVarCS()
{
IteratorVarCSImpl iteratorVarCS = new IteratorVarCSImpl();
return iteratorVarCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IterateExpCS createIterateExpCS()
{
IterateExpCSImpl iterateExpCS = new IterateExpCSImpl();
return iterateExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public AccVarCS createAccVarCS()
{
AccVarCSImpl accVarCS = new AccVarCSImpl();
return accVarCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NameExpCS createNameExpCS()
{
NameExpCSImpl nameExpCS = new NameExpCSImpl();
return nameExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public RoundedBracketClauseCS createRoundedBracketClauseCS()
{
RoundedBracketClauseCSImpl roundedBracketClauseCS = new RoundedBracketClauseCSImpl();
return roundedBracketClauseCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LiteralExpCS createLiteralExpCS()
{
LiteralExpCSImpl literalExpCS = new LiteralExpCSImpl();
return literalExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IntLiteralExpCS createIntLiteralExpCS()
{
IntLiteralExpCSImpl intLiteralExpCS = new IntLiteralExpCSImpl();
return intLiteralExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BooleanLiteralExpCS createBooleanLiteralExpCS()
{
BooleanLiteralExpCSImpl booleanLiteralExpCS = new BooleanLiteralExpCSImpl();
return booleanLiteralExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NullLiteralExpCS createNullLiteralExpCS()
{
NullLiteralExpCSImpl nullLiteralExpCS = new NullLiteralExpCSImpl();
return nullLiteralExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CollectionLiteralExpCS createCollectionLiteralExpCS()
{
CollectionLiteralExpCSImpl collectionLiteralExpCS = new CollectionLiteralExpCSImpl();
return collectionLiteralExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CollectionLiteralPartCS createCollectionLiteralPartCS()
{
CollectionLiteralPartCSImpl collectionLiteralPartCS = new CollectionLiteralPartCSImpl();
return collectionLiteralPartCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LetExpCS createLetExpCS()
{
LetExpCSImpl letExpCS = new LetExpCSImpl();
return letExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public LetVarCS createLetVarCS()
{
LetVarCSImpl letVarCS = new LetVarCSImpl();
return letVarCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PathNameCS createPathNameCS()
{
PathNameCSImpl pathNameCS = new PathNameCSImpl();
return pathNameCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PathElementCS createPathElementCS()
{
PathElementCSImpl pathElementCS = new PathElementCSImpl();
return pathElementCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BooleanExpCS createBooleanExpCS()
{
BooleanExpCSImpl booleanExpCS = new BooleanExpCSImpl();
return booleanExpCS;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CollectionKindCS createCollectionKindCSFromString(EDataType eDataType, String initialValue)
{
CollectionKindCS result = CollectionKindCS.get(initialValue);
if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String convertCollectionKindCSToString(EDataType eDataType, Object instanceValue)
{
return instanceValue == null ? null : instanceValue.toString();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MinioclcsPackage getMinioclcsPackage()
{
return (MinioclcsPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static MinioclcsPackage getPackage()
{
return MinioclcsPackage.eINSTANCE;
}
} //MinioclcsFactoryImpl