| /* |
| * Copyright (c) 2014, 2015 Eike Stepper (Loehne, Germany) 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: |
| * Eike Stepper - initial API and implementation |
| */ |
| package org.eclipse.oomph.setup.git.impl; |
| |
| import org.eclipse.oomph.setup.git.ConfigProperty; |
| import org.eclipse.oomph.setup.git.ConfigSection; |
| import org.eclipse.oomph.setup.git.ConfigSubsection; |
| import org.eclipse.oomph.setup.git.GitCloneTask; |
| import org.eclipse.oomph.setup.git.GitFactory; |
| import org.eclipse.oomph.setup.git.GitPackage; |
| |
| 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; |
| |
| /** |
| * <!-- begin-user-doc --> |
| * An implementation of the model <b>Factory</b>. |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public class GitFactoryImpl extends EFactoryImpl implements GitFactory |
| { |
| /** |
| * Creates the default factory implementation. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public static GitFactory init() |
| { |
| try |
| { |
| GitFactory theGitFactory = (GitFactory)EPackage.Registry.INSTANCE.getEFactory(GitPackage.eNS_URI); |
| if (theGitFactory != null) |
| { |
| return theGitFactory; |
| } |
| } |
| catch (Exception exception) |
| { |
| EcorePlugin.INSTANCE.log(exception); |
| } |
| return new GitFactoryImpl(); |
| } |
| |
| /** |
| * Creates an instance of the factory. |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public GitFactoryImpl() |
| { |
| super(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| @Override |
| public EObject create(EClass eClass) |
| { |
| switch (eClass.getClassifierID()) |
| { |
| case GitPackage.GIT_CLONE_TASK: |
| return createGitCloneTask(); |
| case GitPackage.CONFIG_SECTION: |
| return createConfigSection(); |
| case GitPackage.CONFIG_SUBSECTION: |
| return createConfigSubsection(); |
| case GitPackage.CONFIG_PROPERTY: |
| return createConfigProperty(); |
| default: |
| throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
| } |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public GitCloneTask createGitCloneTask() |
| { |
| GitCloneTaskImpl gitCloneTask = new GitCloneTaskImpl(); |
| return gitCloneTask; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ConfigSection createConfigSection() |
| { |
| ConfigSectionImpl configSection = new ConfigSectionImpl(); |
| return configSection; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ConfigSubsection createConfigSubsection() |
| { |
| ConfigSubsectionImpl configSubsection = new ConfigSubsectionImpl(); |
| return configSubsection; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public ConfigProperty createConfigProperty() |
| { |
| ConfigPropertyImpl configProperty = new ConfigPropertyImpl(); |
| return configProperty; |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @generated |
| */ |
| public GitPackage getGitPackage() |
| { |
| return (GitPackage)getEPackage(); |
| } |
| |
| /** |
| * <!-- begin-user-doc --> |
| * <!-- end-user-doc --> |
| * @deprecated |
| * @generated |
| */ |
| @Deprecated |
| public static GitPackage getPackage() |
| { |
| return GitPackage.eINSTANCE; |
| } |
| |
| } // GitFactoryImpl |