blob: 0b9684bfabca3947a54ea89d54515e752566ab5c [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016, 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 v2.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* E.D.Willink - initial API and implementation
*******************************************************************************/
/**
*/
package org.eclipse.ocl.examples.xtext.tests.bug477283.b.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.jdt.annotation.NonNull;
import org.eclipse.ocl.examples.xtext.tests.bug477283.b.B;
import org.eclipse.ocl.examples.xtext.tests.bug477283.b.Bug477283BFactory;
import org.eclipse.ocl.examples.xtext.tests.bug477283.b.Bug477283BPackage;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class Bug477283BFactoryImpl extends EFactoryImpl implements Bug477283BFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static Bug477283BFactory init() {
try {
Bug477283BFactory theBug477283BFactory = (Bug477283BFactory)EPackage.Registry.INSTANCE.getEFactory(Bug477283BPackage.eNS_URI);
if (theBug477283BFactory != null) {
return theBug477283BFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new Bug477283BFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Bug477283BFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public @NonNull EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case Bug477283BPackage.B: return createB();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public @NonNull B createB() {
BImpl b = new BImpl();
return b;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Bug477283BPackage getBug477283BPackage() {
return (Bug477283BPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static Bug477283BPackage getPackage() {
return Bug477283BPackage.eINSTANCE;
}
} //Bug477283BFactoryImpl