Skip to main content
summaryrefslogtreecommitdiffstats
blob: 9ecf2e20bdcb8b500dad13461f253fc44784456d (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
/*******************************************************************************
 * Copyright (c) 2003, 2005 IBM Corporation and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 * 
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jem.internal.instantiation.impl;
/*


 */

import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;

import java.util.List;

import org.eclipse.jem.internal.instantiation.*;
import org.eclipse.jem.internal.instantiation.base.IJavaInstance;

import org.eclipse.emf.ecore.*;
import org.eclipse.emf.ecore.impl.EFactoryImpl;

/**
 * <!-- begin-user-doc -->
 * An implementation of the model <b>Factory</b>.
 * <!-- end-user-doc -->
 * @generated
 */
public class InstantiationFactoryImpl extends EFactoryImpl implements InstantiationFactory {
	/**
	 * Creates an instance of the factory.
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public InstantiationFactoryImpl() {
		super();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public EObject create(EClass eClass) {
		switch (eClass.getClassifierID()) {
			case InstantiationPackage.INIT_STRING_ALLOCATION: return createInitStringAllocation();
			case InstantiationPackage.IMPLICIT_ALLOCATION: return createImplicitAllocation();
			case InstantiationPackage.PARSE_TREE_ALLOCATION: return createParseTreeAllocation();
			case InstantiationPackage.PT_ARRAY_ACCESS: return createPTArrayAccess();
			case InstantiationPackage.PT_ARRAY_CREATION: return createPTArrayCreation();
			case InstantiationPackage.PT_ARRAY_INITIALIZER: return createPTArrayInitializer();
			case InstantiationPackage.PT_BOOLEAN_LITERAL: return createPTBooleanLiteral();
			case InstantiationPackage.PT_CAST_EXPRESSION: return createPTCastExpression();
			case InstantiationPackage.PT_CHARACTER_LITERAL: return createPTCharacterLiteral();
			case InstantiationPackage.PT_CLASS_INSTANCE_CREATION: return createPTClassInstanceCreation();
			case InstantiationPackage.PT_CONDITIONAL_EXPRESSION: return createPTConditionalExpression();
			case InstantiationPackage.PT_FIELD_ACCESS: return createPTFieldAccess();
			case InstantiationPackage.PT_INFIX_EXPRESSION: return createPTInfixExpression();
			case InstantiationPackage.PT_INSTANCEOF: return createPTInstanceof();
			case InstantiationPackage.PT_METHOD_INVOCATION: return createPTMethodInvocation();
			case InstantiationPackage.PT_NAME: return createPTName();
			case InstantiationPackage.PT_NULL_LITERAL: return createPTNullLiteral();
			case InstantiationPackage.PT_NUMBER_LITERAL: return createPTNumberLiteral();
			case InstantiationPackage.PT_PARENTHESIZED_EXPRESSION: return createPTParenthesizedExpression();
			case InstantiationPackage.PT_PREFIX_EXPRESSION: return createPTPrefixExpression();
			case InstantiationPackage.PT_STRING_LITERAL: return createPTStringLiteral();
			case InstantiationPackage.PT_THIS_LITERAL: return createPTThisLiteral();
			case InstantiationPackage.PT_TYPE_LITERAL: return createPTTypeLiteral();
			case InstantiationPackage.PT_INVALID_EXPRESSION: return createPTInvalidExpression();
			case InstantiationPackage.PT_INSTANCE_REFERENCE: return createPTInstanceReference();
			case InstantiationPackage.PT_ANONYMOUS_CLASS_DECLARATION: return createPTAnonymousClassDeclaration();
			default:
				throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public Object createFromString(EDataType eDataType, String initialValue) {
		switch (eDataType.getClassifierID()) {
			case InstantiationPackage.PT_INFIX_OPERATOR: {
				PTInfixOperator result = PTInfixOperator.get(initialValue);
				if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
				return result;
			}
			case InstantiationPackage.PT_PREFIX_OPERATOR: {
				PTPrefixOperator result = PTPrefixOperator.get(initialValue);
				if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
				return result;
			}
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public String convertToString(EDataType eDataType, Object instanceValue) {
		switch (eDataType.getClassifierID()) {
			case InstantiationPackage.PT_INFIX_OPERATOR:
				return instanceValue == null ? null : instanceValue.toString();
			case InstantiationPackage.PT_PREFIX_OPERATOR:
				return instanceValue == null ? null : instanceValue.toString();
			default:
				throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
		}
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public InitStringAllocation createInitStringAllocation() {
		InitStringAllocationImpl initStringAllocation = new InitStringAllocationImpl();
		return initStringAllocation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ImplicitAllocation createImplicitAllocation() {
		ImplicitAllocationImpl implicitAllocation = new ImplicitAllocationImpl();
		return implicitAllocation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public ParseTreeAllocation createParseTreeAllocation() {
		ParseTreeAllocationImpl parseTreeAllocation = new ParseTreeAllocationImpl();
		return parseTreeAllocation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTArrayAccess createPTArrayAccess() {
		PTArrayAccessImpl ptArrayAccess = new PTArrayAccessImpl();
		return ptArrayAccess;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTArrayCreation createPTArrayCreation() {
		PTArrayCreationImpl ptArrayCreation = new PTArrayCreationImpl();
		return ptArrayCreation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTArrayInitializer createPTArrayInitializer() {
		PTArrayInitializerImpl ptArrayInitializer = new PTArrayInitializerImpl();
		return ptArrayInitializer;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTBooleanLiteral createPTBooleanLiteral() {
		PTBooleanLiteralImpl ptBooleanLiteral = new PTBooleanLiteralImpl();
		return ptBooleanLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTCastExpression createPTCastExpression() {
		PTCastExpressionImpl ptCastExpression = new PTCastExpressionImpl();
		return ptCastExpression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTCharacterLiteral createPTCharacterLiteral() {
		PTCharacterLiteralImpl ptCharacterLiteral = new PTCharacterLiteralImpl();
		return ptCharacterLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTClassInstanceCreation createPTClassInstanceCreation() {
		PTClassInstanceCreationImpl ptClassInstanceCreation = new PTClassInstanceCreationImpl();
		return ptClassInstanceCreation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTConditionalExpression createPTConditionalExpression() {
		PTConditionalExpressionImpl ptConditionalExpression = new PTConditionalExpressionImpl();
		return ptConditionalExpression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTFieldAccess createPTFieldAccess() {
		PTFieldAccessImpl ptFieldAccess = new PTFieldAccessImpl();
		return ptFieldAccess;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTInfixExpression createPTInfixExpression() {
		PTInfixExpressionImpl ptInfixExpression = new PTInfixExpressionImpl();
		return ptInfixExpression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTInstanceof createPTInstanceof() {
		PTInstanceofImpl ptInstanceof = new PTInstanceofImpl();
		return ptInstanceof;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTMethodInvocation createPTMethodInvocation() {
		PTMethodInvocationImpl ptMethodInvocation = new PTMethodInvocationImpl();
		return ptMethodInvocation;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTName createPTName() {
		PTNameImpl ptName = new PTNameImpl();
		return ptName;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTNullLiteral createPTNullLiteral() {
		PTNullLiteralImpl ptNullLiteral = new PTNullLiteralImpl();
		return ptNullLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTNumberLiteral createPTNumberLiteral() {
		PTNumberLiteralImpl ptNumberLiteral = new PTNumberLiteralImpl();
		return ptNumberLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTParenthesizedExpression createPTParenthesizedExpression() {
		PTParenthesizedExpressionImpl ptParenthesizedExpression = new PTParenthesizedExpressionImpl();
		return ptParenthesizedExpression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTPrefixExpression createPTPrefixExpression() {
		PTPrefixExpressionImpl ptPrefixExpression = new PTPrefixExpressionImpl();
		return ptPrefixExpression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTStringLiteral createPTStringLiteral() {
		PTStringLiteralImpl ptStringLiteral = new PTStringLiteralImpl();
		return ptStringLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTThisLiteral createPTThisLiteral() {
		PTThisLiteralImpl ptThisLiteral = new PTThisLiteralImpl();
		return ptThisLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTTypeLiteral createPTTypeLiteral() {
		PTTypeLiteralImpl ptTypeLiteral = new PTTypeLiteralImpl();
		return ptTypeLiteral;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTInvalidExpression createPTInvalidExpression() {
		PTInvalidExpressionImpl ptInvalidExpression = new PTInvalidExpressionImpl();
		return ptInvalidExpression;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTInstanceReference createPTInstanceReference() {
		PTInstanceReferenceImpl ptInstanceReference = new PTInstanceReferenceImpl();
		return ptInstanceReference;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public PTAnonymousClassDeclaration createPTAnonymousClassDeclaration() {
		PTAnonymousClassDeclarationImpl ptAnonymousClassDeclaration = new PTAnonymousClassDeclarationImpl();
		return ptAnonymousClassDeclaration;
	}

	public PTInstanceReference createPTInstanceReference(IJavaInstance instance) {
		PTInstanceReference ptInstanceReference = createPTInstanceReference();
		ptInstanceReference.setReference(instance);
		return ptInstanceReference;
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @generated
	 */
	public InstantiationPackage getInstantiationPackage() {
		return (InstantiationPackage)getEPackage();
	}

	/**
	 * <!-- begin-user-doc -->
	 * <!-- end-user-doc -->
	 * @deprecated
	 * @generated
	 */
	public static InstantiationPackage getPackage() {
		return InstantiationPackage.eINSTANCE;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createImplicitAllocation(org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.EStructuralFeature)
	 */
	public ImplicitAllocation createImplicitAllocation(EObject parent, EStructuralFeature sf) {
		ImplicitAllocation alloc = createImplicitAllocation();
		alloc.setParent(parent);
		alloc.setFeature(sf);
		return alloc;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createInitStringAllocation(java.lang.String)
	 */
	public InitStringAllocation createInitStringAllocation(String initString) {
		InitStringAllocation alloc = createInitStringAllocation();
		alloc.setInitString(initString);
		return alloc;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createParseTreeAllocation(org.eclipse.jem.internal.instantiation.PTExpression)
	 */
	public ParseTreeAllocation createParseTreeAllocation(PTExpression expression) {
		ParseTreeAllocation a = createParseTreeAllocation();
		a.setExpression(expression);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTArrayAccess(org.eclipse.jem.internal.instantiation.PTExpression, java.util.List)
	 */
	public PTArrayAccess createPTArrayAccess(PTExpression array, List indexes) {
		PTArrayAccess a = createPTArrayAccess();
		a.setArray(array);
		a.getIndexes().addAll(indexes);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTArrayCreation(java.lang.String, java.util.List, org.eclipse.jem.internal.instantiation.PTArrayInitializer)
	 */
	public PTArrayCreation createPTArrayCreation(String type, List dimensions, PTArrayInitializer initializer) {
		PTArrayCreation a = createPTArrayCreation();
		a.setType(type);
		if (dimensions != null)
			a.getDimensions().addAll(dimensions);
		a.setInitializer(initializer);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTArrayInitializer(java.util.List)
	 */
	public PTArrayInitializer createPTArrayInitializer(List expressions) {
		PTArrayInitializer a = createPTArrayInitializer();
		if (expressions != null)
			a.getExpressions().addAll(expressions);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTBooleanLiteral(boolean)
	 */
	public PTBooleanLiteral createPTBooleanLiteral(boolean booleanValue) {
		PTBooleanLiteral a = createPTBooleanLiteral();
		a.setBooleanValue(booleanValue);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTCastExpression(java.lang.String, org.eclipse.jem.internal.instantiation.PTExpression)
	 */
	public PTCastExpression createPTCastExpression(String type, PTExpression expression) {
		PTCastExpression a = createPTCastExpression();
		a.setType(type);
		a.setExpression(expression);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTCharacterLiteral(java.lang.String)
	 */
	public PTCharacterLiteral createPTCharacterLiteral(String escapedValue) {
		PTCharacterLiteral a = createPTCharacterLiteral();
		a.setEscapedValue(escapedValue);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTClassInstanceCreation(java.lang.String, java.util.List)
	 */
	public PTClassInstanceCreation createPTClassInstanceCreation(String type, List arguments) {
		PTClassInstanceCreation a = createPTClassInstanceCreation();
		a.setType(type);
		if (arguments != null)
			a.getArguments().addAll(arguments);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTConditionalExpression(org.eclipse.jem.internal.instantiation.PTExpression, org.eclipse.jem.internal.instantiation.PTExpression, org.eclipse.jem.internal.instantiation.PTExpression)
	 */
	public PTConditionalExpression createPTConditionalExpression(
		PTExpression condition,
		PTExpression trueExpressoin,
		PTExpression falseExpression) {
		PTConditionalExpression a = createPTConditionalExpression();
		a.setCondition(condition);
		a.setTrue(trueExpressoin);
		a.setFalse(falseExpression);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTFieldAccess(org.eclipse.jem.internal.instantiation.PTExpression, java.lang.String)
	 */
	public PTFieldAccess createPTFieldAccess(PTExpression receiver, String field) {
		PTFieldAccess a = createPTFieldAccess();
		a.setReceiver(receiver);
		a.setField(field);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTInfixExpression(org.eclipse.jem.internal.instantiation.PTExpression, org.eclipse.jem.internal.instantiation.PTInfixOperator, org.eclipse.jem.internal.instantiation.PTExpression, java.util.List)
	 */
	public PTInfixExpression createPTInfixExpression(
		PTExpression leftOperand,
		PTInfixOperator operator,
		PTExpression rightOperand,
		List extendedOperands) {
		PTInfixExpression a = createPTInfixExpression();
		a.setLeftOperand(leftOperand);
		a.setOperator(operator);
		a.setRightOperand(rightOperand);
		if (extendedOperands != null)
			a.getExtendedOperands().addAll(extendedOperands);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTInstanceof(org.eclipse.jem.internal.instantiation.PTExpression, java.lang.String)
	 */
	public PTInstanceof createPTInstanceof(PTExpression operand, String type) {
		PTInstanceof a = createPTInstanceof();
		a.setOperand(operand);
		a.setType(type);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTInvalidExpression(java.lang.String)
	 */
	public PTInvalidExpression createPTInvalidExpression(String message) {
		PTInvalidExpression a = createPTInvalidExpression();
		a.setMessage(message);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTMethodInvocation(org.eclipse.jem.internal.instantiation.PTExpression, java.lang.String, java.util.List)
	 */
	public PTMethodInvocation createPTMethodInvocation(PTExpression receiver, String name, List arguments) {
		PTMethodInvocation a = createPTMethodInvocation();
		a.setReceiver(receiver);
		a.setName(name);
		if (arguments != null)
			a.getArguments().addAll(arguments);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTName(java.lang.String)
	 */
	public PTName createPTName(String name) {
		PTName a = createPTName();
		a.setName(name);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTNumberLiteral(java.lang.String)
	 */
	public PTNumberLiteral createPTNumberLiteral(String token) {
		PTNumberLiteral a = createPTNumberLiteral();
		a.setToken(token);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTParenthesizedExpression(org.eclipse.jem.internal.instantiation.PTExpression)
	 */
	public PTParenthesizedExpression createPTParenthesizedExpression(PTExpression expression) {
		PTParenthesizedExpression a = createPTParenthesizedExpression();
		a.setExpression(expression);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTPrefixExpression(org.eclipse.jem.internal.instantiation.PTPrefixOperator, org.eclipse.jem.internal.instantiation.PTExpression)
	 */
	public PTPrefixExpression createPTPrefixExpression(PTPrefixOperator operator, PTExpression expression) {
		PTPrefixExpression a = createPTPrefixExpression();
		a.setOperator(operator);
		a.setExpression(expression);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTStringLiteral(java.lang.String)
	 */
	public PTStringLiteral createPTStringLiteral(String escapeLiteral) {
		PTStringLiteral a = createPTStringLiteral();
		a.setEscapedValue(escapeLiteral);
		return a;
	}

	/* (non-Javadoc)
	 * @see org.eclipse.jem.internal.instantiation.InstantiationFactory#createPTTypeLiteral(java.lang.String)
	 */
	public PTTypeLiteral createPTTypeLiteral(String type) {
		PTTypeLiteral a = createPTTypeLiteral();
		a.setType(type);
		return a;
	}

} //InstantiationFactoryImpl

Back to the top