1 17 package org.eclipse.emf.mapping.util; 18 19 import org.eclipse.emf.common.notify.Adapter; 20 import org.eclipse.emf.common.notify.Notifier; 21 import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl; 22 import org.eclipse.emf.ecore.EObject; 23 import org.eclipse.emf.mapping.*; 24 25 26 34 public class MappingAdapterFactory extends AdapterFactoryImpl 35 { 36 37 43 protected static MappingPackage modelPackage; 44 45 51 public MappingAdapterFactory() 52 { 53 if (modelPackage == null) 54 { 55 modelPackage = MappingPackage.eINSTANCE; 56 } 57 } 58 59 67 public boolean isFactoryForType(Object object) 68 { 69 if (object == modelPackage) 70 { 71 return true; 72 } 73 if (object instanceof EObject) 74 { 75 return ((EObject)object).eClass().getEPackage() == modelPackage; 76 } 77 return false; 78 } 79 80 86 protected MappingSwitch modelSwitch = 87 new MappingSwitch() 88 { 89 public Object caseMappingHelper(MappingHelper object) 90 { 91 return createMappingHelperAdapter(); 92 } 93 public Object caseMapping(Mapping object) 94 { 95 return createMappingAdapter(); 96 } 97 public Object caseTypeConverter(TypeConverter object) 98 { 99 return createTypeConverterAdapter(); 100 } 101 public Object caseFunctionPair(FunctionPair object) 102 { 103 return createFunctionPairAdapter(); 104 } 105 public Object caseFunctionNamePair(FunctionNamePair object) 106 { 107 return createFunctionNamePairAdapter(); 108 } 109 public Object caseMappingStrategy(MappingStrategy object) 110 { 111 return createMappingStrategyAdapter(); 112 } 113 public Object caseMappingRoot(MappingRoot object) 114 { 115 return createMappingRootAdapter(); 116 } 117 public Object caseComplexTypeConverter(ComplexTypeConverter object) 118 { 119 return createComplexTypeConverterAdapter(); 120 } 121 public Object defaultCase(EObject object) 122 { 123 return createEObjectAdapter(); 124 } 125 }; 126 127 135 public Adapter createAdapter(Notifier target) 136 { 137 return (Adapter)modelSwitch.doSwitch((EObject)target); 138 } 139 140 141 151 public Adapter createMappingHelperAdapter() 152 { 153 return null; 154 } 155 156 166 public Adapter createMappingAdapter() 167 { 168 return null; 169 } 170 171 181 public Adapter createTypeConverterAdapter() 182 { 183 return null; 184 } 185 186 196 public Adapter createFunctionPairAdapter() 197 { 198 return null; 199 } 200 201 211 public Adapter createFunctionNamePairAdapter() 212 { 213 return null; 214 } 215 216 226 public Adapter createMappingStrategyAdapter() 227 { 228 return null; 229 } 230 231 241 public Adapter createMappingRootAdapter() 242 { 243 return null; 244 } 245 246 256 public Adapter createComplexTypeConverterAdapter() 257 { 258 return null; 259 } 260 261 269 public Adapter createEObjectAdapter() 270 { 271 return null; 272 } 273 274 } | Popular Tags |