[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(); |
---|
[100] | 73 | case EbnfPackage.COMMENT: return createComment(); |
---|
[88] | 74 | case EbnfPackage.IMPORT: return createImport(); |
---|
| 75 | case EbnfPackage.RULE: return createRule(); |
---|
| 76 | case EbnfPackage.EXT_RULE: return createExtRule(); |
---|
| 77 | case EbnfPackage.MERGE_RULE: return createMergeRule(); |
---|
| 78 | case EbnfPackage.GLOBAL_COMBINATOR: return createGlobalCombinator(); |
---|
| 79 | case EbnfPackage.RULE_COMBINATOR: return createRuleCombinator(); |
---|
| 80 | case EbnfPackage.HOOK_COMBINATOR: return createHookCombinator(); |
---|
| 81 | case EbnfPackage.DEFINITION_LIST: return createDefinitionList(); |
---|
| 82 | case EbnfPackage.SINGLE_DEFINITION: return createSingleDefinition(); |
---|
| 83 | case EbnfPackage.TERM: return createTerm(); |
---|
| 84 | case EbnfPackage.ATOM: return createAtom(); |
---|
| 85 | case EbnfPackage.RULE_REFERENCE: return createRuleReference(); |
---|
| 86 | case EbnfPackage.STRING_RULE: return createStringRule(); |
---|
| 87 | case EbnfPackage.GROUPED_SEQUENCE: return createGroupedSequence(); |
---|
| 88 | case EbnfPackage.OPTIONAL_SEQUENCE: return createOptionalSequence(); |
---|
| 89 | case EbnfPackage.REPEATED_SEQUENCE: return createRepeatedSequence(); |
---|
[95] | 90 | case EbnfPackage.REPEAT_RANGE: return createRepeatRange(); |
---|
[88] | 91 | default: |
---|
| 92 | throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); |
---|
| 93 | } |
---|
| 94 | } |
---|
| 95 | |
---|
| 96 | /** |
---|
| 97 | * <!-- begin-user-doc --> |
---|
| 98 | * <!-- end-user-doc --> |
---|
| 99 | * @generated |
---|
| 100 | */ |
---|
| 101 | public EtsiBnf createEtsiBnf() |
---|
| 102 | { |
---|
| 103 | EtsiBnfImpl etsiBnf = new EtsiBnfImpl(); |
---|
| 104 | return etsiBnf; |
---|
| 105 | } |
---|
| 106 | |
---|
| 107 | /** |
---|
| 108 | * <!-- begin-user-doc --> |
---|
| 109 | * <!-- end-user-doc --> |
---|
| 110 | * @generated |
---|
| 111 | */ |
---|
| 112 | public ImportSection createImportSection() |
---|
| 113 | { |
---|
| 114 | ImportSectionImpl importSection = new ImportSectionImpl(); |
---|
| 115 | return importSection; |
---|
| 116 | } |
---|
| 117 | |
---|
| 118 | /** |
---|
| 119 | * <!-- begin-user-doc --> |
---|
| 120 | * <!-- end-user-doc --> |
---|
| 121 | * @generated |
---|
| 122 | */ |
---|
| 123 | public BnfEntry createBnfEntry() |
---|
| 124 | { |
---|
| 125 | BnfEntryImpl bnfEntry = new BnfEntryImpl(); |
---|
| 126 | return bnfEntry; |
---|
| 127 | } |
---|
| 128 | |
---|
| 129 | /** |
---|
| 130 | * <!-- begin-user-doc --> |
---|
| 131 | * <!-- end-user-doc --> |
---|
| 132 | * @generated |
---|
| 133 | */ |
---|
| 134 | public DeltaEntry createDeltaEntry() |
---|
| 135 | { |
---|
| 136 | DeltaEntryImpl deltaEntry = new DeltaEntryImpl(); |
---|
| 137 | return deltaEntry; |
---|
| 138 | } |
---|
| 139 | |
---|
| 140 | /** |
---|
| 141 | * <!-- begin-user-doc --> |
---|
| 142 | * <!-- end-user-doc --> |
---|
| 143 | * @generated |
---|
| 144 | */ |
---|
| 145 | public MergeEntry createMergeEntry() |
---|
| 146 | { |
---|
| 147 | MergeEntryImpl mergeEntry = new MergeEntryImpl(); |
---|
| 148 | return mergeEntry; |
---|
| 149 | } |
---|
| 150 | |
---|
| 151 | /** |
---|
| 152 | * <!-- begin-user-doc --> |
---|
| 153 | * <!-- end-user-doc --> |
---|
| 154 | * @generated |
---|
| 155 | */ |
---|
| 156 | public SectionHeading createSectionHeading() |
---|
| 157 | { |
---|
| 158 | SectionHeadingImpl sectionHeading = new SectionHeadingImpl(); |
---|
| 159 | return sectionHeading; |
---|
| 160 | } |
---|
| 161 | |
---|
| 162 | /** |
---|
| 163 | * <!-- begin-user-doc --> |
---|
| 164 | * <!-- end-user-doc --> |
---|
| 165 | * @generated |
---|
| 166 | */ |
---|
[100] | 167 | public Comment createComment() |
---|
| 168 | { |
---|
| 169 | CommentImpl comment = new CommentImpl(); |
---|
| 170 | return comment; |
---|
| 171 | } |
---|
| 172 | |
---|
| 173 | /** |
---|
| 174 | * <!-- begin-user-doc --> |
---|
| 175 | * <!-- end-user-doc --> |
---|
| 176 | * @generated |
---|
| 177 | */ |
---|
[88] | 178 | public Import createImport() |
---|
| 179 | { |
---|
| 180 | ImportImpl import_ = new ImportImpl(); |
---|
| 181 | return import_; |
---|
| 182 | } |
---|
| 183 | |
---|
| 184 | /** |
---|
| 185 | * <!-- begin-user-doc --> |
---|
| 186 | * <!-- end-user-doc --> |
---|
| 187 | * @generated |
---|
| 188 | */ |
---|
| 189 | public Rule createRule() |
---|
| 190 | { |
---|
| 191 | RuleImpl rule = new RuleImpl(); |
---|
| 192 | return rule; |
---|
| 193 | } |
---|
| 194 | |
---|
| 195 | /** |
---|
| 196 | * <!-- begin-user-doc --> |
---|
| 197 | * <!-- end-user-doc --> |
---|
| 198 | * @generated |
---|
| 199 | */ |
---|
| 200 | public ExtRule createExtRule() |
---|
| 201 | { |
---|
| 202 | ExtRuleImpl extRule = new ExtRuleImpl(); |
---|
| 203 | return extRule; |
---|
| 204 | } |
---|
| 205 | |
---|
| 206 | /** |
---|
| 207 | * <!-- begin-user-doc --> |
---|
| 208 | * <!-- end-user-doc --> |
---|
| 209 | * @generated |
---|
| 210 | */ |
---|
| 211 | public MergeRule createMergeRule() |
---|
| 212 | { |
---|
| 213 | MergeRuleImpl mergeRule = new MergeRuleImpl(); |
---|
| 214 | return mergeRule; |
---|
| 215 | } |
---|
| 216 | |
---|
| 217 | /** |
---|
| 218 | * <!-- begin-user-doc --> |
---|
| 219 | * <!-- end-user-doc --> |
---|
| 220 | * @generated |
---|
| 221 | */ |
---|
| 222 | public GlobalCombinator createGlobalCombinator() |
---|
| 223 | { |
---|
| 224 | GlobalCombinatorImpl globalCombinator = new GlobalCombinatorImpl(); |
---|
| 225 | return globalCombinator; |
---|
| 226 | } |
---|
| 227 | |
---|
| 228 | /** |
---|
| 229 | * <!-- begin-user-doc --> |
---|
| 230 | * <!-- end-user-doc --> |
---|
| 231 | * @generated |
---|
| 232 | */ |
---|
| 233 | public RuleCombinator createRuleCombinator() |
---|
| 234 | { |
---|
| 235 | RuleCombinatorImpl ruleCombinator = new RuleCombinatorImpl(); |
---|
| 236 | return ruleCombinator; |
---|
| 237 | } |
---|
| 238 | |
---|
| 239 | /** |
---|
| 240 | * <!-- begin-user-doc --> |
---|
| 241 | * <!-- end-user-doc --> |
---|
| 242 | * @generated |
---|
| 243 | */ |
---|
| 244 | public HookCombinator createHookCombinator() |
---|
| 245 | { |
---|
| 246 | HookCombinatorImpl hookCombinator = new HookCombinatorImpl(); |
---|
| 247 | return hookCombinator; |
---|
| 248 | } |
---|
| 249 | |
---|
| 250 | /** |
---|
| 251 | * <!-- begin-user-doc --> |
---|
| 252 | * <!-- end-user-doc --> |
---|
| 253 | * @generated |
---|
| 254 | */ |
---|
| 255 | public DefinitionList createDefinitionList() |
---|
| 256 | { |
---|
| 257 | DefinitionListImpl definitionList = new DefinitionListImpl(); |
---|
| 258 | return definitionList; |
---|
| 259 | } |
---|
| 260 | |
---|
| 261 | /** |
---|
| 262 | * <!-- begin-user-doc --> |
---|
| 263 | * <!-- end-user-doc --> |
---|
| 264 | * @generated |
---|
| 265 | */ |
---|
| 266 | public SingleDefinition createSingleDefinition() |
---|
| 267 | { |
---|
| 268 | SingleDefinitionImpl singleDefinition = new SingleDefinitionImpl(); |
---|
| 269 | return singleDefinition; |
---|
| 270 | } |
---|
| 271 | |
---|
| 272 | /** |
---|
| 273 | * <!-- begin-user-doc --> |
---|
| 274 | * <!-- end-user-doc --> |
---|
| 275 | * @generated |
---|
| 276 | */ |
---|
| 277 | public Term createTerm() |
---|
| 278 | { |
---|
| 279 | TermImpl term = new TermImpl(); |
---|
| 280 | return term; |
---|
| 281 | } |
---|
| 282 | |
---|
| 283 | /** |
---|
| 284 | * <!-- begin-user-doc --> |
---|
| 285 | * <!-- end-user-doc --> |
---|
| 286 | * @generated |
---|
| 287 | */ |
---|
| 288 | public Atom createAtom() |
---|
| 289 | { |
---|
| 290 | AtomImpl atom = new AtomImpl(); |
---|
| 291 | return atom; |
---|
| 292 | } |
---|
| 293 | |
---|
| 294 | /** |
---|
| 295 | * <!-- begin-user-doc --> |
---|
| 296 | * <!-- end-user-doc --> |
---|
| 297 | * @generated |
---|
| 298 | */ |
---|
| 299 | public RuleReference createRuleReference() |
---|
| 300 | { |
---|
| 301 | RuleReferenceImpl ruleReference = new RuleReferenceImpl(); |
---|
| 302 | return ruleReference; |
---|
| 303 | } |
---|
| 304 | |
---|
| 305 | /** |
---|
| 306 | * <!-- begin-user-doc --> |
---|
| 307 | * <!-- end-user-doc --> |
---|
| 308 | * @generated |
---|
| 309 | */ |
---|
| 310 | public StringRule createStringRule() |
---|
| 311 | { |
---|
| 312 | StringRuleImpl stringRule = new StringRuleImpl(); |
---|
| 313 | return stringRule; |
---|
| 314 | } |
---|
| 315 | |
---|
| 316 | /** |
---|
| 317 | * <!-- begin-user-doc --> |
---|
| 318 | * <!-- end-user-doc --> |
---|
| 319 | * @generated |
---|
| 320 | */ |
---|
| 321 | public GroupedSequence createGroupedSequence() |
---|
| 322 | { |
---|
| 323 | GroupedSequenceImpl groupedSequence = new GroupedSequenceImpl(); |
---|
| 324 | return groupedSequence; |
---|
| 325 | } |
---|
| 326 | |
---|
| 327 | /** |
---|
| 328 | * <!-- begin-user-doc --> |
---|
| 329 | * <!-- end-user-doc --> |
---|
| 330 | * @generated |
---|
| 331 | */ |
---|
| 332 | public OptionalSequence createOptionalSequence() |
---|
| 333 | { |
---|
| 334 | OptionalSequenceImpl optionalSequence = new OptionalSequenceImpl(); |
---|
| 335 | return optionalSequence; |
---|
| 336 | } |
---|
| 337 | |
---|
| 338 | /** |
---|
| 339 | * <!-- begin-user-doc --> |
---|
| 340 | * <!-- end-user-doc --> |
---|
| 341 | * @generated |
---|
| 342 | */ |
---|
| 343 | public RepeatedSequence createRepeatedSequence() |
---|
| 344 | { |
---|
| 345 | RepeatedSequenceImpl repeatedSequence = new RepeatedSequenceImpl(); |
---|
| 346 | return repeatedSequence; |
---|
| 347 | } |
---|
| 348 | |
---|
| 349 | /** |
---|
| 350 | * <!-- begin-user-doc --> |
---|
| 351 | * <!-- end-user-doc --> |
---|
| 352 | * @generated |
---|
| 353 | */ |
---|
[95] | 354 | public RepeatRange createRepeatRange() |
---|
| 355 | { |
---|
| 356 | RepeatRangeImpl repeatRange = new RepeatRangeImpl(); |
---|
| 357 | return repeatRange; |
---|
| 358 | } |
---|
| 359 | |
---|
| 360 | /** |
---|
| 361 | * <!-- begin-user-doc --> |
---|
| 362 | * <!-- end-user-doc --> |
---|
| 363 | * @generated |
---|
| 364 | */ |
---|
[88] | 365 | public EbnfPackage getEbnfPackage() |
---|
| 366 | { |
---|
| 367 | return (EbnfPackage)getEPackage(); |
---|
| 368 | } |
---|
| 369 | |
---|
| 370 | /** |
---|
| 371 | * <!-- begin-user-doc --> |
---|
| 372 | * <!-- end-user-doc --> |
---|
| 373 | * @deprecated |
---|
| 374 | * @generated |
---|
| 375 | */ |
---|
| 376 | @Deprecated |
---|
| 377 | public static EbnfPackage getPackage() |
---|
| 378 | { |
---|
| 379 | return EbnfPackage.eINSTANCE; |
---|
| 380 | } |
---|
| 381 | |
---|
| 382 | } //EbnfFactoryImpl |
---|