/******************************************************************************* * Copyright (c) 2007 Borland Software Corporation 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: * Borland Software Corporation - initial API and implementation *******************************************************************************/ package rdb.view.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 rdb.view.ReferencedViewColumn; import rdb.view.View; import rdb.view.ViewAlias; import rdb.view.ViewExpressionColumn; import rdb.view.ViewFactory; import rdb.view.ViewPackage; /** * <!-- begin-user-doc --> * An implementation of the model <b>Factory</b>. * <!-- end-user-doc --> * @generated */ public class ViewFactoryImpl extends EFactoryImpl implements ViewFactory { /** * Creates the default factory implementation. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static ViewFactory init() { try { ViewFactory theViewFactory = (ViewFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/qvt/1.0.0/Operational/examples/rdb/view"); //$NON-NLS-1$ if (theViewFactory != null) { return theViewFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new ViewFactoryImpl(); } /** * Creates an instance of the factory. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ViewFactoryImpl() { super(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { case ViewPackage.VIEW: return createView(); case ViewPackage.VIEW_ALIAS: return createViewAlias(); case ViewPackage.VIEW_EXPRESSION_COLUMN: return createViewExpressionColumn(); case ViewPackage.REFERENCED_VIEW_COLUMN: return createReferencedViewColumn(); default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$ } } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public View createView() { ViewImpl view = new ViewImpl(); return view; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ViewAlias createViewAlias() { ViewAliasImpl viewAlias = new ViewAliasImpl(); return viewAlias; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ViewExpressionColumn createViewExpressionColumn() { ViewExpressionColumnImpl viewExpressionColumn = new ViewExpressionColumnImpl(); return viewExpressionColumn; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ReferencedViewColumn createReferencedViewColumn() { ReferencedViewColumnImpl referencedViewColumn = new ReferencedViewColumnImpl(); return referencedViewColumn; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public ViewPackage getViewPackage() { return (ViewPackage)getEPackage(); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @deprecated * @generated */ @Deprecated public static ViewPackage getPackage() { return ViewPackage.eINSTANCE; } } //ViewFactoryImpl