blob: e896326bf94797a9fee234c9b376e093413f0b51 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 TU Wien.
* 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:
* Alexander Bergmayr (TU Wien) - initial API and implementation
*
* Initially developed in the context of ARTIST EU project www.artist-project.eu
*******************************************************************************/
/**
*/
package org.eclipse.upr.platform.trace.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.upr.platform.trace.*;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class TraceFactoryImpl extends EFactoryImpl implements TraceFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static TraceFactory init() {
try {
TraceFactory theTraceFactory = (TraceFactory)EPackage.Registry.INSTANCE.getEFactory(TracePackage.eNS_URI);
if (theTraceFactory != null) {
return theTraceFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new TraceFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TraceFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case TracePackage.TRACE: return createTrace();
case TracePackage.TRACE_LINK: return createTraceLink();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Trace createTrace() {
TraceImpl trace = new TraceImpl();
return trace;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TraceLink createTraceLink() {
TraceLinkImpl traceLink = new TraceLinkImpl();
return traceLink;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TracePackage getTracePackage() {
return (TracePackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static TracePackage getPackage() {
return TracePackage.eINSTANCE;
}
} //TraceFactoryImpl