/******************************************************************************* * Copyright (c) 2009, 2010 Oracle. * 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: * Oracle - initial API and implementation *******************************************************************************/ package org.eclipse.jpt.core.resource.xml; 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; /** * * The Factory for the model. * It provides a create method for each non-abstract class of the model. * * Provisional API: This interface is part of an interim API that is still * under development and expected to change significantly before reaching * stability. It is available at this early stage to solicit feedback from * pioneering adopters on the understanding that any code that uses this API * will almost certainly be broken (repeatedly) as the API evolves. * * @see org.eclipse.jpt.core.resource.xml.CommonPackage * @generated */ public class CommonFactory extends EFactoryImpl { /** * The singleton instance of the factory. * * * @generated */ public static final CommonFactory eINSTANCE = init(); /** * Creates the default factory implementation. * * * @generated */ public static CommonFactory init() { try { CommonFactory theCommonFactory = (CommonFactory)EPackage.Registry.INSTANCE.getEFactory("jpt.common.xmi"); if (theCommonFactory != null) { return theCommonFactory; } } catch (Exception exception) { EcorePlugin.INSTANCE.log(exception); } return new CommonFactory(); } /** * Creates an instance of the factory. * * * @generated */ public CommonFactory() { super(); } /** * * * @generated */ @Override public EObject create(EClass eClass) { switch (eClass.getClassifierID()) { default: throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); } } /** * * * @generated */ public CommonPackage getCommonPackage() { return (CommonPackage)getEPackage(); } /** * * * @deprecated * @generated */ @Deprecated public static CommonPackage getPackage() { return CommonPackage.eINSTANCE; } } //CommonFactory