[88] | 1 | /** |
---|
| 2 | */ |
---|
| 3 | package de.ugoe.cs.swe.bnftools.ebnf.impl; |
---|
| 4 | |
---|
| 5 | import de.ugoe.cs.swe.bnftools.ebnf.*; |
---|
| 6 | |
---|
| 7 | import org.eclipse.emf.ecore.EClass; |
---|
| 8 | import org.eclipse.emf.ecore.EObject; |
---|
| 9 | import org.eclipse.emf.ecore.EPackage; |
---|
| 10 | |
---|
| 11 | import org.eclipse.emf.ecore.impl.EFactoryImpl; |
---|
| 12 | |
---|
| 13 | import org.eclipse.emf.ecore.plugin.EcorePlugin; |
---|
| 14 | |
---|
| 15 | /** |
---|
| 16 | * <!-- begin-user-doc --> |
---|
| 17 | * An implementation of the model <b>Factory</b>. |
---|
| 18 | * <!-- end-user-doc --> |
---|
| 19 | * @generated |
---|
| 20 | */ |
---|
| 21 | public class EbnfFactoryImpl extends EFactoryImpl implements EbnfFactory |
---|
| 22 | { |
---|
| 23 | /** |
---|
| 24 | * Creates the default factory implementation. |
---|
| 25 | * <!-- begin-user-doc --> |
---|
| 26 | * <!-- end-user-doc --> |
---|
| 27 | * @generated |
---|
| 28 | */ |
---|
| 29 | public static EbnfFactory init() |
---|
| 30 | { |
---|
| 31 | try |
---|
| 32 | { |
---|
| 33 | EbnfFactory theEbnfFactory = (EbnfFactory)EPackage.Registry.INSTANCE.getEFactory(EbnfPackage.eNS_URI); |
---|
| 34 | if (theEbnfFactory != null) |
---|
| 35 | { |
---|
| 36 | return theEbnfFactory; |
---|
| 37 | } |
---|
| 38 | } |
---|
| 39 | catch (Exception exception) |
---|
| 40 | { |
---|
| 41 | EcorePlugin.INSTANCE.log(exception); |
---|
| 42 | } |
---|
| 43 | return new EbnfFactoryImpl(); |
---|
| 44 | } |
---|
| 45 | |
---|
| 46 | /** |
---|
| 47 | * Creates an instance of the factory. |
---|
| 48 | * <!-- begin-user-doc --> |
---|
| 49 | * <!-- end-user-doc --> |
---|
| 50 | * @generated |
---|
| 51 | */ |
---|
| 52 | public EbnfFactoryImpl() |
---|
| 53 | { |
---|
| 54 | super(); |
---|
| 55 | } |
---|
| 56 | |
---|
| 57 | /** |
---|
| 58 | * <!-- begin-user-doc --> |
---|
| 59 | * <!-- end-user-doc --> |
---|
| 60 | * @generated |
---|
| 61 | */ |
---|
| 62 | @Override |
---|
| 63 | public EObject create(EClass eClass) |
---|
| 64 | { |
---|
| 65 | switch (eClass.getClassifierID()) |
---|
| 66 | { |
---|
| 67 | case EbnfPackage.ETSI_BNF: return createEtsiBnf(); |
---|
| 68 | case EbnfPackage.IMPORT_SECTION: return createImportSection(); |
---|
| 69 | case EbnfPackage.BNF_ENTRY: return createBnfEntry(); |
---|
| 70 | case EbnfPackage.DELTA_ENTRY: return createDeltaEntry(); |
---|
| 71 | case EbnfPackage.MERGE_ENTRY: return createMergeEntry(); |
---|
| 72 | case EbnfPackage.SECTION_HEADING: return createSectionHeading(); |
---|
| 73 | case EbnfPackage.IMPORT: return createImport(); |
---|
| 74 | case EbnfPackage.RULE: return createRule(); |
---|
| 75 | case EbnfPackage.EXT_RULE: return createExtRule(); |
---|
| 76 | case EbnfPackage.MERGE_RULE: return createMergeRule(); |
---|
| 77 | case EbnfPackage.GLOBAL_COMBINATOR: return createGlobalCombinator(); |
---|
| 78 | case EbnfPackage.RULE_COMBINATOR: return createRuleCombinator(); |
---|
| 79 | case EbnfPackage.HOOK_COMBINATOR: return createHookCombinator(); |
---|
| 80 | case EbnfPackage.DEFINITION_LIST: return createDefinitionList(); |
---|
| 81 | case EbnfPackage.SINGLE_DEFINITION: return createSingleDefinition(); |
---|
| 82 | case EbnfPackage.TERM: return createTerm(); |
---|
| 83 | case EbnfPackage.ATOM: return createAtom(); |
---|
| 84 | case EbnfPackage.RULE_REFERENCE: return createRuleReference(); |
---|
| 85 | case EbnfPackage.STRING_RULE: return createStringRule(); |
---|
| 86 | case EbnfPackage.GROUPED_SEQUENCE: return createGroupedSequence(); |
---|
| 87 | case EbnfPackage.OPTIONAL_SEQUENCE: return createOptionalSequence(); |
---|
| 88 | case EbnfPackage.REPEATED_SEQUENCE: return createRepeatedSequence(); |
---|
| 89 | default: |
---|
| 90 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
---|
| 91 | } |
---|
| 92 | } |
---|
| 93 | |
---|
| 94 | /** |
---|
| 95 | * <!-- begin-user-doc --> |
---|
| 96 | * <!-- end-user-doc --> |
---|
| 97 | * @generated |
---|
| 98 | */ |
---|
| 99 | public EtsiBnf createEtsiBnf() |
---|
| 100 | { |
---|
| 101 | EtsiBnfImpl etsiBnf = new EtsiBnfImpl(); |
---|
| 102 | return etsiBnf; |
---|
| 103 | } |
---|
| 104 | |
---|
| 105 | /** |
---|
| 106 | * <!-- begin-user-doc --> |
---|
| 107 | * <!-- end-user-doc --> |
---|
| 108 | * @generated |
---|
| 109 | */ |
---|
| 110 | public ImportSection createImportSection() |
---|
| 111 | { |
---|
| 112 | ImportSectionImpl importSection = new ImportSectionImpl(); |
---|
| 113 | return importSection; |
---|
| 114 | } |
---|
| 115 | |
---|
| 116 | /** |
---|
| 117 | * <!-- begin-user-doc --> |
---|
| 118 | * <!-- end-user-doc --> |
---|
| 119 | * @generated |
---|
| 120 | */ |
---|
| 121 | public BnfEntry createBnfEntry() |
---|
| 122 | { |
---|
| 123 | BnfEntryImpl bnfEntry = new BnfEntryImpl(); |
---|
| 124 | return bnfEntry; |
---|
| 125 | } |
---|
| 126 | |
---|
| 127 | /** |
---|
| 128 | * <!-- begin-user-doc --> |
---|
| 129 | * <!-- end-user-doc --> |
---|
| 130 | * @generated |
---|
| 131 | */ |
---|
| 132 | public DeltaEntry createDeltaEntry() |
---|
| 133 | { |
---|
| 134 | DeltaEntryImpl deltaEntry = new DeltaEntryImpl(); |
---|
| 135 | return deltaEntry; |
---|
| 136 | } |
---|
| 137 | |
---|
| 138 | /** |
---|
| 139 | * <!-- begin-user-doc --> |
---|
| 140 | * <!-- end-user-doc --> |
---|
| 141 | * @generated |
---|
| 142 | */ |
---|
| 143 | public MergeEntry createMergeEntry() |
---|
| 144 | { |
---|
| 145 | MergeEntryImpl mergeEntry = new MergeEntryImpl(); |
---|
| 146 | return mergeEntry; |
---|
| 147 | } |
---|
| 148 | |
---|
| 149 | /** |
---|
| 150 | * <!-- begin-user-doc --> |
---|
| 151 | * <!-- end-user-doc --> |
---|
| 152 | * @generated |
---|
| 153 | */ |
---|
| 154 | public SectionHeading createSectionHeading() |
---|
| 155 | { |
---|
| 156 | SectionHeadingImpl sectionHeading = new SectionHeadingImpl(); |
---|
| 157 | return sectionHeading; |
---|
| 158 | } |
---|
| 159 | |
---|
| 160 | /** |
---|
| 161 | * <!-- begin-user-doc --> |
---|
| 162 | * <!-- end-user-doc --> |
---|
| 163 | * @generated |
---|
| 164 | */ |
---|
| 165 | public Import createImport() |
---|
| 166 | { |
---|
| 167 | ImportImpl import_ = new ImportImpl(); |
---|
| 168 | return import_; |
---|
| 169 | } |
---|
| 170 | |
---|
| 171 | /** |
---|
| 172 | * <!-- begin-user-doc --> |
---|
| 173 | * <!-- end-user-doc --> |
---|
| 174 | * @generated |
---|
| 175 | */ |
---|
| 176 | public Rule createRule() |
---|
| 177 | { |
---|
| 178 | RuleImpl rule = new RuleImpl(); |
---|
| 179 | return rule; |
---|
| 180 | } |
---|
| 181 | |
---|
| 182 | /** |
---|
| 183 | * <!-- begin-user-doc --> |
---|
| 184 | * <!-- end-user-doc --> |
---|
| 185 | * @generated |
---|
| 186 | */ |
---|
| 187 | public ExtRule createExtRule() |
---|
| 188 | { |
---|
| 189 | ExtRuleImpl extRule = new ExtRuleImpl(); |
---|
| 190 | return extRule; |
---|
| 191 | } |
---|
| 192 | |
---|
| 193 | /** |
---|
| 194 | * <!-- begin-user-doc --> |
---|
| 195 | * <!-- end-user-doc --> |
---|
| 196 | * @generated |
---|
| 197 | */ |
---|
| 198 | public MergeRule createMergeRule() |
---|
| 199 | { |
---|
| 200 | MergeRuleImpl mergeRule = new MergeRuleImpl(); |
---|
| 201 | return mergeRule; |
---|
| 202 | } |
---|
| 203 | |
---|
| 204 | /** |
---|
| 205 | * <!-- begin-user-doc --> |
---|
| 206 | * <!-- end-user-doc --> |
---|
| 207 | * @generated |
---|
| 208 | */ |
---|
| 209 | public GlobalCombinator createGlobalCombinator() |
---|
| 210 | { |
---|
| 211 | GlobalCombinatorImpl globalCombinator = new GlobalCombinatorImpl(); |
---|
| 212 | return globalCombinator; |
---|
| 213 | } |
---|
| 214 | |
---|
| 215 | /** |
---|
| 216 | * <!-- begin-user-doc --> |
---|
| 217 | * <!-- end-user-doc --> |
---|
| 218 | * @generated |
---|
| 219 | */ |
---|
| 220 | public RuleCombinator createRuleCombinator() |
---|
| 221 | { |
---|
| 222 | RuleCombinatorImpl ruleCombinator = new RuleCombinatorImpl(); |
---|
| 223 | return ruleCombinator; |
---|
| 224 | } |
---|
| 225 | |
---|
| 226 | /** |
---|
| 227 | * <!-- begin-user-doc --> |
---|
| 228 | * <!-- end-user-doc --> |
---|
| 229 | * @generated |
---|
| 230 | */ |
---|
| 231 | public HookCombinator createHookCombinator() |
---|
| 232 | { |
---|
| 233 | HookCombinatorImpl hookCombinator = new HookCombinatorImpl(); |
---|
| 234 | return hookCombinator; |
---|
| 235 | } |
---|
| 236 | |
---|
| 237 | /** |
---|
| 238 | * <!-- begin-user-doc --> |
---|
| 239 | * <!-- end-user-doc --> |
---|
| 240 | * @generated |
---|
| 241 | */ |
---|
| 242 | public DefinitionList createDefinitionList() |
---|
| 243 | { |
---|
| 244 | DefinitionListImpl definitionList = new DefinitionListImpl(); |
---|
| 245 | return definitionList; |
---|
| 246 | } |
---|
| 247 | |
---|
| 248 | /** |
---|
| 249 | * <!-- begin-user-doc --> |
---|
| 250 | * <!-- end-user-doc --> |
---|
| 251 | * @generated |
---|
| 252 | */ |
---|
| 253 | public SingleDefinition createSingleDefinition() |
---|
| 254 | { |
---|
| 255 | SingleDefinitionImpl singleDefinition = new SingleDefinitionImpl(); |
---|
| 256 | return singleDefinition; |
---|
| 257 | } |
---|
| 258 | |
---|
| 259 | /** |
---|
| 260 | * <!-- begin-user-doc --> |
---|
| 261 | * <!-- end-user-doc --> |
---|
| 262 | * @generated |
---|
| 263 | */ |
---|
| 264 | public Term createTerm() |
---|
| 265 | { |
---|
| 266 | TermImpl term = new TermImpl(); |
---|
| 267 | return term; |
---|
| 268 | } |
---|
| 269 | |
---|
| 270 | /** |
---|
| 271 | * <!-- begin-user-doc --> |
---|
| 272 | * <!-- end-user-doc --> |
---|
| 273 | * @generated |
---|
| 274 | */ |
---|
| 275 | public Atom createAtom() |
---|
| 276 | { |
---|
| 277 | AtomImpl atom = new AtomImpl(); |
---|
| 278 | return atom; |
---|
| 279 | } |
---|
| 280 | |
---|
| 281 | /** |
---|
| 282 | * <!-- begin-user-doc --> |
---|
| 283 | * <!-- end-user-doc --> |
---|
| 284 | * @generated |
---|
| 285 | */ |
---|
| 286 | public RuleReference createRuleReference() |
---|
| 287 | { |
---|
| 288 | RuleReferenceImpl ruleReference = new RuleReferenceImpl(); |
---|
| 289 | return ruleReference; |
---|
| 290 | } |
---|
| 291 | |
---|
| 292 | /** |
---|
| 293 | * <!-- begin-user-doc --> |
---|
| 294 | * <!-- end-user-doc --> |
---|
| 295 | * @generated |
---|
| 296 | */ |
---|
| 297 | public StringRule createStringRule() |
---|
| 298 | { |
---|
| 299 | StringRuleImpl stringRule = new StringRuleImpl(); |
---|
| 300 | return stringRule; |
---|
| 301 | } |
---|
| 302 | |
---|
| 303 | /** |
---|
| 304 | * <!-- begin-user-doc --> |
---|
| 305 | * <!-- end-user-doc --> |
---|
| 306 | * @generated |
---|
| 307 | */ |
---|
| 308 | public GroupedSequence createGroupedSequence() |
---|
| 309 | { |
---|
| 310 | GroupedSequenceImpl groupedSequence = new GroupedSequenceImpl(); |
---|
| 311 | return groupedSequence; |
---|
| 312 | } |
---|
| 313 | |
---|
| 314 | /** |
---|
| 315 | * <!-- begin-user-doc --> |
---|
| 316 | * <!-- end-user-doc --> |
---|
| 317 | * @generated |
---|
| 318 | */ |
---|
| 319 | public OptionalSequence createOptionalSequence() |
---|
| 320 | { |
---|
| 321 | OptionalSequenceImpl optionalSequence = new OptionalSequenceImpl(); |
---|
| 322 | return optionalSequence; |
---|
| 323 | } |
---|
| 324 | |
---|
| 325 | /** |
---|
| 326 | * <!-- begin-user-doc --> |
---|
| 327 | * <!-- end-user-doc --> |
---|
| 328 | * @generated |
---|
| 329 | */ |
---|
| 330 | public RepeatedSequence createRepeatedSequence() |
---|
| 331 | { |
---|
| 332 | RepeatedSequenceImpl repeatedSequence = new RepeatedSequenceImpl(); |
---|
| 333 | return repeatedSequence; |
---|
| 334 | } |
---|
| 335 | |
---|
| 336 | /** |
---|
| 337 | * <!-- begin-user-doc --> |
---|
| 338 | * <!-- end-user-doc --> |
---|
| 339 | * @generated |
---|
| 340 | */ |
---|
| 341 | public EbnfPackage getEbnfPackage() |
---|
| 342 | { |
---|
| 343 | return (EbnfPackage)getEPackage(); |
---|
| 344 | } |
---|
| 345 | |
---|
| 346 | /** |
---|
| 347 | * <!-- begin-user-doc --> |
---|
| 348 | * <!-- end-user-doc --> |
---|
| 349 | * @deprecated |
---|
| 350 | * @generated |
---|
| 351 | */ |
---|
| 352 | @Deprecated |
---|
| 353 | public static EbnfPackage getPackage() |
---|
| 354 | { |
---|
| 355 | return EbnfPackage.eINSTANCE; |
---|
| 356 | } |
---|
| 357 | |
---|
| 358 | } //EbnfFactoryImpl |
---|