1 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 32 public class TreeFactoryImpl extends EFactoryImpl implements TreeFactory 33 { 34 40 public TreeFactoryImpl() 41 { 42 super(); 43 } 44 45 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 ("The class '" + eClass.getName() + "' is not a valid classifier"); 57 } 58 } 59 60 65 public TreeNode createTreeNode() 66 { 67 TreeNodeImpl treeNode = new TreeNodeImpl(); 68 return treeNode; 69 } 70 71 76 public TreePackage getTreePackage() 77 { 78 return (TreePackage)getEPackage(); 79 } 80 81 87 public static TreePackage getPackage() 88 { 89 return TreePackage.eINSTANCE; 90 } 91 92 } | Popular Tags |