KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > edit > tree > impl > TreeFactoryImpl


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: TreeFactoryImpl.java,v 1.5 2005/06/08 06:17:06 nickb Exp $
16  */

17 package org.eclipse.emf.edit.tree.impl;
18
19
20 import org.eclipse.emf.ecore.EClass;
21 import org.eclipse.emf.ecore.EObject;
22 import org.eclipse.emf.ecore.impl.EFactoryImpl;
23 import org.eclipse.emf.edit.tree.*;
24
25
26 /**
27  * <!-- begin-user-doc -->
28  * An implementation of the model <b>Factory</b>.
29  * <!-- end-user-doc -->
30  * @generated
31  */

32 public class TreeFactoryImpl extends EFactoryImpl implements TreeFactory
33 {
34   /**
35    * Creates an instance of the factory.
36    * <!-- begin-user-doc -->
37    * <!-- end-user-doc -->
38    * @generated
39    */

40   public TreeFactoryImpl()
41   {
42     super();
43   }
44
45   /**
46    * <!-- begin-user-doc -->
47    * <!-- end-user-doc -->
48    * @generated
49    */

50   public EObject create(EClass eClass)
51   {
52     switch (eClass.getClassifierID())
53     {
54       case TreePackage.TREE_NODE: return createTreeNode();
55       default:
56         throw new IllegalArgumentException JavaDoc("The class '" + eClass.getName() + "' is not a valid classifier");
57     }
58   }
59
60   /**
61    * <!-- begin-user-doc -->
62    * <!-- end-user-doc -->
63    * @generated
64    */

65   public TreeNode createTreeNode()
66   {
67     TreeNodeImpl treeNode = new TreeNodeImpl();
68     return treeNode;
69   }
70
71   /**
72    * <!-- begin-user-doc -->
73    * <!-- end-user-doc -->
74    * @generated
75    */

76   public TreePackage getTreePackage()
77   {
78     return (TreePackage)getEPackage();
79   }
80
81   /**
82    * <!-- begin-user-doc -->
83    * <!-- end-user-doc -->
84    * @deprecated
85    * @generated
86    */

87   public static TreePackage getPackage()
88   {
89     return TreePackage.eINSTANCE;
90   }
91
92 } //TreeFactoryImpl
93
Popular Tags