blob: 6cb2a9cc4d451dff7cda992595a9fe9cc3033f71 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2009, 2019 Xored Software Inc 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
* https://www.eclipse.org/legal/epl-v20.html
*
* Contributors:
* Xored Software Inc - initial API and implementation and/or initial documentation
*******************************************************************************/
package org.eclipse.rcptt.filesystem.impl;
import org.eclipse.rcptt.filesystem.*;
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 FilesystemFactoryImpl extends EFactoryImpl implements FilesystemFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static FilesystemFactory init() {
try {
FilesystemFactory theFilesystemFactory = (FilesystemFactory)EPackage.Registry.INSTANCE.getEFactory("http://eclipse.org/rcptt/ctx/filesystem");
if (theFilesystemFactory != null) {
return theFilesystemFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new FilesystemFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FilesystemFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case FilesystemPackage.FILESYSTEM_CONTEXT: return createFilesystemContext();
case FilesystemPackage.FS_FILE: return createFSFile();
case FilesystemPackage.FS_FOLDER: return createFSFolder();
case FilesystemPackage.FS_CAPTURE_PARAM: return createFSCaptureParam();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FilesystemContext createFilesystemContext() {
FilesystemContextImpl filesystemContext = new FilesystemContextImpl();
return filesystemContext;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FSFile createFSFile() {
FSFileImpl fsFile = new FSFileImpl();
return fsFile;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FSFolder createFSFolder() {
FSFolderImpl fsFolder = new FSFolderImpl();
return fsFolder;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FSCaptureParam createFSCaptureParam() {
FSCaptureParamImpl fsCaptureParam = new FSCaptureParamImpl();
return fsCaptureParam;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public FilesystemPackage getFilesystemPackage() {
return (FilesystemPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static FilesystemPackage getPackage() {
return FilesystemPackage.eINSTANCE;
}
} //FilesystemFactoryImpl