blob: e285b86b65b4243277f7ed1a393bde076c93ae21 [file] [log] [blame]
/**
* * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro
* * 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:
* * Istvan Rath, Daniel Varro - initial API and implementation
*
*/
package org.eclipse.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.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.viatra2.gtasmmodel.gtasm.metamodel.asm.terms.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class TermsFactoryImpl extends EFactoryImpl implements TermsFactory
{
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String copyright = " * Copyright (c) 2006-2010 Istvan Rath and Daniel Varro\r\n * All rights reserved. This program and the accompanying materials\r\n * are made available under the terms of the Eclipse Public License v1.0\r\n * which accompanies this distribution, and is available at\r\n * http://www.eclipse.org/legal/epl-v10.html\r\n *\r\n * Contributors:\r\n * Istvan Rath, Daniel Varro - initial API and implementation\r\n";
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static TermsFactory init()
{
try
{
TermsFactory theTermsFactory = (TermsFactory)EPackage.Registry.INSTANCE.getEFactory("http:///viatragtasmmodel/gtasm/metamodel/asm/terms.ecore");
if (theTermsFactory != null)
{
return theTermsFactory;
}
}
catch (Exception exception)
{
EcorePlugin.INSTANCE.log(exception);
}
return new TermsFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TermsFactoryImpl()
{
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass)
{
switch (eClass.getClassifierID())
{
case TermsPackage.VARIABLE_REFERENCE: return createVariableReference();
case TermsPackage.GT_PATTERN_CALL: return createGTPatternCall();
case TermsPackage.ASM_FUNCTION_INVOCATION: return createASMFunctionInvocation();
case TermsPackage.CONSTANT: return createConstant();
case TermsPackage.NATIVE_FUNCTION_INVOCATION: return createNativeFunctionInvocation();
case TermsPackage.MODEL_ELEMENT_QUERY: return createModelElementQuery();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public VariableReference createVariableReference()
{
VariableReferenceImpl variableReference = new VariableReferenceImpl();
return variableReference;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GTPatternCall createGTPatternCall()
{
GTPatternCallImpl gtPatternCall = new GTPatternCallImpl();
return gtPatternCall;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ASMFunctionInvocation createASMFunctionInvocation()
{
ASMFunctionInvocationImpl asmFunctionInvocation = new ASMFunctionInvocationImpl();
return asmFunctionInvocation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Constant createConstant()
{
ConstantImpl constant = new ConstantImpl();
return constant;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NativeFunctionInvocation createNativeFunctionInvocation()
{
NativeFunctionInvocationImpl nativeFunctionInvocation = new NativeFunctionInvocationImpl();
return nativeFunctionInvocation;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ModelElementQuery createModelElementQuery()
{
ModelElementQueryImpl modelElementQuery = new ModelElementQueryImpl();
return modelElementQuery;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TermsPackage getTermsPackage()
{
return (TermsPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static TermsPackage getPackage()
{
return TermsPackage.eINSTANCE;
}
} //TermsFactoryImpl