| /** |
| */ |
| package org.eclipse.emf.ecp.view.edapt.util.test.model.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.emf.ecp.view.edapt.util.test.model.b.B; |
| import org.eclipse.emf.ecp.view.edapt.util.test.model.b.BFactory; |
| import org.eclipse.emf.ecp.view.edapt.util.test.model.b.BPackage; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public class BFactoryImpl extends EFactoryImpl implements BFactory { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public static BFactory init() { |
| try { |
| final BFactory theBFactory = (BFactory) EPackage.Registry.INSTANCE.getEFactory(BPackage.eNS_URI); |
| if (theBFactory != null) { |
| return theBFactory; |
| } |
| } catch (final Exception exception) { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new BFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| public BFactoryImpl() { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) { |
| switch (eClass.getClassifierID()) { |
| case BPackage.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 B createB() { |
| final BImpl b = new BImpl(); |
| return b; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @generated |
| */ |
| @Override |
| public BPackage getBPackage() { |
| return (BPackage) getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static BPackage getPackage() { |
| return BPackage.eINSTANCE; |
| } |
| |
| } // BFactoryImpl |