001 package edu.rice.cs.javalanglevels.tree;
002
003 /**
004 * An extension of DF visitors that copies as it visits (by default).
005 * Override forCASE if you want to transform an AST subtree.
006 */
007 public abstract class JExpressionIFCopyDepthFirstVisitor extends JExpressionIFDepthFirstVisitor<JExpressionIF> {
008
009 protected JExpressionIF[] makeArrayOfRetType(int size) {
010 return new JExpressionIF[size];
011 }
012
013 /* Methods to visit an item. */
014 public JExpressionIF forJExpressionOnly(JExpression that) {
015 return defaultCase(that);
016 }
017
018 public JExpressionIF forSourceFileOnly(SourceFile that, JExpressionIF[] packageStatements_result, JExpressionIF[] importStatements_result, JExpressionIF[] types_result) {
019 return new SourceFile(that.getSourceInfo(), (PackageStatement[])packageStatements_result, (ImportStatement[])importStatements_result, (TypeDefBase[])types_result);
020 }
021
022 public JExpressionIF forModifiersAndVisibilityOnly(ModifiersAndVisibility that) {
023 return new ModifiersAndVisibility(that.getSourceInfo(), that.getModifiers());
024 }
025
026 public JExpressionIF forCompoundWordOnly(CompoundWord that, JExpressionIF[] words_result) {
027 return new CompoundWord(that.getSourceInfo(), (Word[])words_result);
028 }
029
030 public JExpressionIF forWordOnly(Word that) {
031 return new Word(that.getSourceInfo(), that.getText());
032 }
033
034 public JExpressionIF forTypeDefBaseOnly(TypeDefBase that, JExpressionIF mav_result, JExpressionIF name_result, JExpressionIF[] typeParameters_result, JExpressionIF[] interfaces_result, JExpressionIF body_result) {
035 return defaultCase(that);
036 }
037
038 public JExpressionIF forClassDefOnly(ClassDef that, JExpressionIF mav_result, JExpressionIF name_result, JExpressionIF[] typeParameters_result, JExpressionIF superclass_result, JExpressionIF[] interfaces_result, JExpressionIF body_result) {
039 return new ClassDef(that.getSourceInfo(), (ModifiersAndVisibility)mav_result, (Word)name_result, (TypeParameter[])typeParameters_result, (ReferenceType)superclass_result, (ReferenceType[])interfaces_result, (BracedBody)body_result);
040 }
041
042 public JExpressionIF forInnerClassDefOnly(InnerClassDef that, JExpressionIF mav_result, JExpressionIF name_result, JExpressionIF[] typeParameters_result, JExpressionIF superclass_result, JExpressionIF[] interfaces_result, JExpressionIF body_result) {
043 return new InnerClassDef(that.getSourceInfo(), (ModifiersAndVisibility)mav_result, (Word)name_result, (TypeParameter[])typeParameters_result, (ReferenceType)superclass_result, (ReferenceType[])interfaces_result, (BracedBody)body_result);
044 }
045
046 public JExpressionIF forInterfaceDefOnly(InterfaceDef that, JExpressionIF mav_result, JExpressionIF name_result, JExpressionIF[] typeParameters_result, JExpressionIF[] interfaces_result, JExpressionIF body_result) {
047 return new InterfaceDef(that.getSourceInfo(), (ModifiersAndVisibility)mav_result, (Word)name_result, (TypeParameter[])typeParameters_result, (ReferenceType[])interfaces_result, (BracedBody)body_result);
048 }
049
050 public JExpressionIF forInnerInterfaceDefOnly(InnerInterfaceDef that, JExpressionIF mav_result, JExpressionIF name_result, JExpressionIF[] typeParameters_result, JExpressionIF[] interfaces_result, JExpressionIF body_result) {
051 return new InnerInterfaceDef(that.getSourceInfo(), (ModifiersAndVisibility)mav_result, (Word)name_result, (TypeParameter[])typeParameters_result, (ReferenceType[])interfaces_result, (BracedBody)body_result);
052 }
053
054 public JExpressionIF forConstructorDefOnly(ConstructorDef that, JExpressionIF name_result, JExpressionIF mav_result, JExpressionIF[] parameters_result, JExpressionIF[] throws_result, JExpressionIF statements_result) {
055 return new ConstructorDef(that.getSourceInfo(), (Word)name_result, (ModifiersAndVisibility)mav_result, (FormalParameter[])parameters_result, (ReferenceType[])throws_result, (BracedBody)statements_result);
056 }
057
058 public JExpressionIF forInitializerOnly(Initializer that, JExpressionIF code_result) {
059 return defaultCase(that);
060 }
061
062 public JExpressionIF forInstanceInitializerOnly(InstanceInitializer that, JExpressionIF code_result) {
063 return new InstanceInitializer(that.getSourceInfo(), (Block)code_result);
064 }
065
066 public JExpressionIF forStaticInitializerOnly(StaticInitializer that, JExpressionIF code_result) {
067 return new StaticInitializer(that.getSourceInfo(), (Block)code_result);
068 }
069
070 public JExpressionIF forPackageStatementOnly(PackageStatement that, JExpressionIF cWord_result) {
071 return new PackageStatement(that.getSourceInfo(), (CompoundWord)cWord_result);
072 }
073
074 public JExpressionIF forImportStatementOnly(ImportStatement that, JExpressionIF cWord_result) {
075 return defaultCase(that);
076 }
077
078 public JExpressionIF forClassImportStatementOnly(ClassImportStatement that, JExpressionIF cWord_result) {
079 return new ClassImportStatement(that.getSourceInfo(), (CompoundWord)cWord_result);
080 }
081
082 public JExpressionIF forPackageImportStatementOnly(PackageImportStatement that, JExpressionIF cWord_result) {
083 return new PackageImportStatement(that.getSourceInfo(), (CompoundWord)cWord_result);
084 }
085
086 public JExpressionIF forStatementOnly(Statement that) {
087 return defaultCase(that);
088 }
089
090 public JExpressionIF forLabeledStatementOnly(LabeledStatement that, JExpressionIF label_result, JExpressionIF statement_result) {
091 return new LabeledStatement(that.getSourceInfo(), (Word)label_result, (Statement)statement_result);
092 }
093
094 public JExpressionIF forBlockOnly(Block that, JExpressionIF statements_result) {
095 return new Block(that.getSourceInfo(), (BracedBody)statements_result);
096 }
097
098 public JExpressionIF forExpressionStatementOnly(ExpressionStatement that, JExpressionIF expression_result) {
099 return new ExpressionStatement(that.getSourceInfo(), (Expression)expression_result);
100 }
101
102 public JExpressionIF forSwitchStatementOnly(SwitchStatement that, JExpressionIF test_result, JExpressionIF[] cases_result) {
103 return new SwitchStatement(that.getSourceInfo(), (Expression)test_result, (SwitchCase[])cases_result);
104 }
105
106 public JExpressionIF forIfThenStatementOnly(IfThenStatement that, JExpressionIF testExpression_result, JExpressionIF thenStatement_result) {
107 return new IfThenStatement(that.getSourceInfo(), (Expression)testExpression_result, (Statement)thenStatement_result);
108 }
109
110 public JExpressionIF forIfThenElseStatementOnly(IfThenElseStatement that, JExpressionIF testExpression_result, JExpressionIF thenStatement_result, JExpressionIF elseStatement_result) {
111 return new IfThenElseStatement(that.getSourceInfo(), (Expression)testExpression_result, (Statement)thenStatement_result, (Statement)elseStatement_result);
112 }
113
114 public JExpressionIF forWhileStatementOnly(WhileStatement that, JExpressionIF condition_result, JExpressionIF code_result) {
115 return new WhileStatement(that.getSourceInfo(), (Expression)condition_result, (Statement)code_result);
116 }
117
118 public JExpressionIF forDoStatementOnly(DoStatement that, JExpressionIF code_result, JExpressionIF condition_result) {
119 return new DoStatement(that.getSourceInfo(), (Statement)code_result, (Expression)condition_result);
120 }
121
122 public JExpressionIF forForStatementOnly(ForStatement that, JExpressionIF init_result, JExpressionIF condition_result, JExpressionIF update_result, JExpressionIF code_result) {
123 return new ForStatement(that.getSourceInfo(), (ForInitI)init_result, (ForConditionI)condition_result, (UnparenthesizedExpressionList)update_result, (Statement)code_result);
124 }
125
126 public JExpressionIF forBreakStatementOnly(BreakStatement that) {
127 return defaultCase(that);
128 }
129
130 public JExpressionIF forLabeledBreakStatementOnly(LabeledBreakStatement that, JExpressionIF label_result) {
131 return new LabeledBreakStatement(that.getSourceInfo(), (Word)label_result);
132 }
133
134 public JExpressionIF forUnlabeledBreakStatementOnly(UnlabeledBreakStatement that) {
135 return new UnlabeledBreakStatement(that.getSourceInfo());
136 }
137
138 public JExpressionIF forContinueStatementOnly(ContinueStatement that) {
139 return defaultCase(that);
140 }
141
142 public JExpressionIF forLabeledContinueStatementOnly(LabeledContinueStatement that, JExpressionIF label_result) {
143 return new LabeledContinueStatement(that.getSourceInfo(), (Word)label_result);
144 }
145
146 public JExpressionIF forUnlabeledContinueStatementOnly(UnlabeledContinueStatement that) {
147 return new UnlabeledContinueStatement(that.getSourceInfo());
148 }
149
150 public JExpressionIF forReturnStatementOnly(ReturnStatement that) {
151 return defaultCase(that);
152 }
153
154 public JExpressionIF forVoidReturnStatementOnly(VoidReturnStatement that) {
155 return new VoidReturnStatement(that.getSourceInfo());
156 }
157
158 public JExpressionIF forValueReturnStatementOnly(ValueReturnStatement that, JExpressionIF value_result) {
159 return new ValueReturnStatement(that.getSourceInfo(), (Expression)value_result);
160 }
161
162 public JExpressionIF forThrowStatementOnly(ThrowStatement that, JExpressionIF thrown_result) {
163 return new ThrowStatement(that.getSourceInfo(), (Expression)thrown_result);
164 }
165
166 public JExpressionIF forSynchronizedStatementOnly(SynchronizedStatement that, JExpressionIF lockExpr_result, JExpressionIF block_result) {
167 return new SynchronizedStatement(that.getSourceInfo(), (Expression)lockExpr_result, (Block)block_result);
168 }
169
170 public JExpressionIF forTryCatchStatementOnly(TryCatchStatement that, JExpressionIF tryBlock_result, JExpressionIF[] catchBlocks_result) {
171 return defaultCase(that);
172 }
173
174 public JExpressionIF forTryCatchFinallyStatementOnly(TryCatchFinallyStatement that, JExpressionIF tryBlock_result, JExpressionIF[] catchBlocks_result, JExpressionIF finallyBlock_result) {
175 return new TryCatchFinallyStatement(that.getSourceInfo(), (Block)tryBlock_result, (CatchBlock[])catchBlocks_result, (Block)finallyBlock_result);
176 }
177
178 public JExpressionIF forNormalTryCatchStatementOnly(NormalTryCatchStatement that, JExpressionIF tryBlock_result, JExpressionIF[] catchBlocks_result) {
179 return new NormalTryCatchStatement(that.getSourceInfo(), (Block)tryBlock_result, (CatchBlock[])catchBlocks_result);
180 }
181
182 public JExpressionIF forEmptyStatementOnly(EmptyStatement that) {
183 return new EmptyStatement(that.getSourceInfo());
184 }
185
186 public JExpressionIF forMethodDefOnly(MethodDef that, JExpressionIF mav_result, JExpressionIF[] typeParams_result, JExpressionIF result_result, JExpressionIF name_result, JExpressionIF[] params_result, JExpressionIF[] throws_result) {
187 return defaultCase(that);
188 }
189
190 public JExpressionIF forConcreteMethodDefOnly(ConcreteMethodDef that, JExpressionIF mav_result, JExpressionIF[] typeParams_result, JExpressionIF result_result, JExpressionIF name_result, JExpressionIF[] params_result, JExpressionIF[] throws_result, JExpressionIF body_result) {
191 return new ConcreteMethodDef(that.getSourceInfo(), (ModifiersAndVisibility)mav_result, (TypeParameter[])typeParams_result, (ReturnTypeI)result_result, (Word)name_result, (FormalParameter[])params_result, (ReferenceType[])throws_result, (BracedBody)body_result);
192 }
193
194 public JExpressionIF forAbstractMethodDefOnly(AbstractMethodDef that, JExpressionIF mav_result, JExpressionIF[] typeParams_result, JExpressionIF result_result, JExpressionIF name_result, JExpressionIF[] params_result, JExpressionIF[] throws_result) {
195 return new AbstractMethodDef(that.getSourceInfo(), (ModifiersAndVisibility)mav_result, (TypeParameter[])typeParams_result, (ReturnTypeI)result_result, (Word)name_result, (FormalParameter[])params_result, (ReferenceType[])throws_result);
196 }
197
198 public JExpressionIF forFormalParameterOnly(FormalParameter that, JExpressionIF declarator_result) {
199 return new FormalParameter(that.getSourceInfo(), (VariableDeclarator)declarator_result, that.isIsFinal());
200 }
201
202 public JExpressionIF forVariableDeclarationOnly(VariableDeclaration that, JExpressionIF mav_result, JExpressionIF[] declarators_result) {
203 return new VariableDeclaration(that.getSourceInfo(), (ModifiersAndVisibility)mav_result, (VariableDeclarator[])declarators_result);
204 }
205
206 public JExpressionIF forVariableDeclaratorOnly(VariableDeclarator that, JExpressionIF type_result, JExpressionIF name_result) {
207 return defaultCase(that);
208 }
209
210 public JExpressionIF forUninitializedVariableDeclaratorOnly(UninitializedVariableDeclarator that, JExpressionIF type_result, JExpressionIF name_result) {
211 return new UninitializedVariableDeclarator(that.getSourceInfo(), (Type)type_result, (Word)name_result);
212 }
213
214 public JExpressionIF forInitializedVariableDeclaratorOnly(InitializedVariableDeclarator that, JExpressionIF type_result, JExpressionIF name_result, JExpressionIF initializer_result) {
215 return new InitializedVariableDeclarator(that.getSourceInfo(), (Type)type_result, (Word)name_result, (VariableInitializerI)initializer_result);
216 }
217
218 public JExpressionIF forTypeParameterOnly(TypeParameter that, JExpressionIF variable_result, JExpressionIF bound_result) {
219 return new TypeParameter(that.getSourceInfo(), (TypeVariable)variable_result, (ReferenceType)bound_result);
220 }
221
222 public JExpressionIF forArrayInitializerOnly(ArrayInitializer that, JExpressionIF[] items_result) {
223 return new ArrayInitializer(that.getSourceInfo(), (VariableInitializerI[])items_result);
224 }
225
226 public JExpressionIF forTypeOnly(Type that) {
227 return defaultCase(that);
228 }
229
230 public JExpressionIF forPrimitiveTypeOnly(PrimitiveType that) {
231 return new PrimitiveType(that.getSourceInfo(), that.getName());
232 }
233
234 public JExpressionIF forArrayTypeOnly(ArrayType that, JExpressionIF elementType_result) {
235 return new ArrayType(that.getSourceInfo(), that.getName(), (Type)elementType_result);
236 }
237
238 public JExpressionIF forReferenceTypeOnly(ReferenceType that) {
239 return defaultCase(that);
240 }
241
242 public JExpressionIF forMemberTypeOnly(MemberType that, JExpressionIF left_result, JExpressionIF right_result) {
243 return new MemberType(that.getSourceInfo(), that.getName(), (ReferenceType)left_result, (ReferenceType)right_result);
244 }
245
246 public JExpressionIF forClassOrInterfaceTypeOnly(ClassOrInterfaceType that, JExpressionIF[] typeArguments_result) {
247 return new ClassOrInterfaceType(that.getSourceInfo(), that.getName(), (Type[])typeArguments_result);
248 }
249
250 public JExpressionIF forTypeVariableOnly(TypeVariable that) {
251 return new TypeVariable(that.getSourceInfo(), that.getName());
252 }
253
254 public JExpressionIF forVoidReturnOnly(VoidReturn that) {
255 return new VoidReturn(that.getSourceInfo(), that.getName());
256 }
257
258 public JExpressionIF forSwitchCaseOnly(SwitchCase that, JExpressionIF code_result) {
259 return defaultCase(that);
260 }
261
262 public JExpressionIF forLabeledCaseOnly(LabeledCase that, JExpressionIF label_result, JExpressionIF code_result) {
263 return new LabeledCase(that.getSourceInfo(), (Expression)label_result, (UnbracedBody)code_result);
264 }
265
266 public JExpressionIF forDefaultCaseOnly(DefaultCase that, JExpressionIF code_result) {
267 return new DefaultCase(that.getSourceInfo(), (UnbracedBody)code_result);
268 }
269
270 public JExpressionIF forCatchBlockOnly(CatchBlock that, JExpressionIF exception_result, JExpressionIF block_result) {
271 return new CatchBlock(that.getSourceInfo(), (FormalParameter)exception_result, (Block)block_result);
272 }
273
274 public JExpressionIF forExpressionOnly(Expression that) {
275 return defaultCase(that);
276 }
277
278 public JExpressionIF forAssignmentExpressionOnly(AssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
279 return defaultCase(that);
280 }
281
282 public JExpressionIF forSimpleAssignmentExpressionOnly(SimpleAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
283 return new SimpleAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
284 }
285
286 public JExpressionIF forPlusAssignmentExpressionOnly(PlusAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
287 return new PlusAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
288 }
289
290 public JExpressionIF forNumericAssignmentExpressionOnly(NumericAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
291 return defaultCase(that);
292 }
293
294 public JExpressionIF forMinusAssignmentExpressionOnly(MinusAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
295 return new MinusAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
296 }
297
298 public JExpressionIF forMultiplyAssignmentExpressionOnly(MultiplyAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
299 return new MultiplyAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
300 }
301
302 public JExpressionIF forDivideAssignmentExpressionOnly(DivideAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
303 return new DivideAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
304 }
305
306 public JExpressionIF forModAssignmentExpressionOnly(ModAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
307 return new ModAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
308 }
309
310 public JExpressionIF forShiftAssignmentExpressionOnly(ShiftAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
311 return defaultCase(that);
312 }
313
314 public JExpressionIF forLeftShiftAssignmentExpressionOnly(LeftShiftAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
315 return new LeftShiftAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
316 }
317
318 public JExpressionIF forRightSignedShiftAssignmentExpressionOnly(RightSignedShiftAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
319 return new RightSignedShiftAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
320 }
321
322 public JExpressionIF forRightUnsignedShiftAssignmentExpressionOnly(RightUnsignedShiftAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
323 return new RightUnsignedShiftAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
324 }
325
326 public JExpressionIF forBitwiseAssignmentExpressionOnly(BitwiseAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
327 return defaultCase(that);
328 }
329
330 public JExpressionIF forBitwiseAndAssignmentExpressionOnly(BitwiseAndAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
331 return new BitwiseAndAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
332 }
333
334 public JExpressionIF forBitwiseOrAssignmentExpressionOnly(BitwiseOrAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
335 return new BitwiseOrAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
336 }
337
338 public JExpressionIF forBitwiseXorAssignmentExpressionOnly(BitwiseXorAssignmentExpression that, JExpressionIF name_result, JExpressionIF value_result) {
339 return new BitwiseXorAssignmentExpression(that.getSourceInfo(), (Expression)name_result, (Expression)value_result);
340 }
341
342 public JExpressionIF forBinaryExpressionOnly(BinaryExpression that, JExpressionIF left_result, JExpressionIF right_result) {
343 return defaultCase(that);
344 }
345
346 public JExpressionIF forBooleanExpressionOnly(BooleanExpression that, JExpressionIF left_result, JExpressionIF right_result) {
347 return defaultCase(that);
348 }
349
350 public JExpressionIF forOrExpressionOnly(OrExpression that, JExpressionIF left_result, JExpressionIF right_result) {
351 return new OrExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
352 }
353
354 public JExpressionIF forAndExpressionOnly(AndExpression that, JExpressionIF left_result, JExpressionIF right_result) {
355 return new AndExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
356 }
357
358 public JExpressionIF forBitwiseBinaryExpressionOnly(BitwiseBinaryExpression that, JExpressionIF left_result, JExpressionIF right_result) {
359 return defaultCase(that);
360 }
361
362 public JExpressionIF forBitwiseOrExpressionOnly(BitwiseOrExpression that, JExpressionIF left_result, JExpressionIF right_result) {
363 return new BitwiseOrExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
364 }
365
366 public JExpressionIF forBitwiseXorExpressionOnly(BitwiseXorExpression that, JExpressionIF left_result, JExpressionIF right_result) {
367 return new BitwiseXorExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
368 }
369
370 public JExpressionIF forBitwiseAndExpressionOnly(BitwiseAndExpression that, JExpressionIF left_result, JExpressionIF right_result) {
371 return new BitwiseAndExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
372 }
373
374 public JExpressionIF forEqualityExpressionOnly(EqualityExpression that, JExpressionIF left_result, JExpressionIF right_result) {
375 return defaultCase(that);
376 }
377
378 public JExpressionIF forEqualsExpressionOnly(EqualsExpression that, JExpressionIF left_result, JExpressionIF right_result) {
379 return new EqualsExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
380 }
381
382 public JExpressionIF forNotEqualExpressionOnly(NotEqualExpression that, JExpressionIF left_result, JExpressionIF right_result) {
383 return new NotEqualExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
384 }
385
386 public JExpressionIF forComparisonExpressionOnly(ComparisonExpression that, JExpressionIF left_result, JExpressionIF right_result) {
387 return defaultCase(that);
388 }
389
390 public JExpressionIF forLessThanExpressionOnly(LessThanExpression that, JExpressionIF left_result, JExpressionIF right_result) {
391 return new LessThanExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
392 }
393
394 public JExpressionIF forLessThanOrEqualExpressionOnly(LessThanOrEqualExpression that, JExpressionIF left_result, JExpressionIF right_result) {
395 return new LessThanOrEqualExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
396 }
397
398 public JExpressionIF forGreaterThanExpressionOnly(GreaterThanExpression that, JExpressionIF left_result, JExpressionIF right_result) {
399 return new GreaterThanExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
400 }
401
402 public JExpressionIF forGreaterThanOrEqualExpressionOnly(GreaterThanOrEqualExpression that, JExpressionIF left_result, JExpressionIF right_result) {
403 return new GreaterThanOrEqualExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
404 }
405
406 public JExpressionIF forShiftBinaryExpressionOnly(ShiftBinaryExpression that, JExpressionIF left_result, JExpressionIF right_result) {
407 return defaultCase(that);
408 }
409
410 public JExpressionIF forLeftShiftExpressionOnly(LeftShiftExpression that, JExpressionIF left_result, JExpressionIF right_result) {
411 return new LeftShiftExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
412 }
413
414 public JExpressionIF forRightSignedShiftExpressionOnly(RightSignedShiftExpression that, JExpressionIF left_result, JExpressionIF right_result) {
415 return new RightSignedShiftExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
416 }
417
418 public JExpressionIF forRightUnsignedShiftExpressionOnly(RightUnsignedShiftExpression that, JExpressionIF left_result, JExpressionIF right_result) {
419 return new RightUnsignedShiftExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
420 }
421
422 public JExpressionIF forPlusExpressionOnly(PlusExpression that, JExpressionIF left_result, JExpressionIF right_result) {
423 return new PlusExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
424 }
425
426 public JExpressionIF forNumericBinaryExpressionOnly(NumericBinaryExpression that, JExpressionIF left_result, JExpressionIF right_result) {
427 return defaultCase(that);
428 }
429
430 public JExpressionIF forMinusExpressionOnly(MinusExpression that, JExpressionIF left_result, JExpressionIF right_result) {
431 return new MinusExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
432 }
433
434 public JExpressionIF forMultiplyExpressionOnly(MultiplyExpression that, JExpressionIF left_result, JExpressionIF right_result) {
435 return new MultiplyExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
436 }
437
438 public JExpressionIF forDivideExpressionOnly(DivideExpression that, JExpressionIF left_result, JExpressionIF right_result) {
439 return new DivideExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
440 }
441
442 public JExpressionIF forModExpressionOnly(ModExpression that, JExpressionIF left_result, JExpressionIF right_result) {
443 return new ModExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
444 }
445
446 public JExpressionIF forNoOpExpressionOnly(NoOpExpression that, JExpressionIF left_result, JExpressionIF right_result) {
447 return new NoOpExpression(that.getSourceInfo(), (Expression)left_result, (Expression)right_result);
448 }
449
450 public JExpressionIF forUnaryExpressionOnly(UnaryExpression that, JExpressionIF value_result) {
451 return defaultCase(that);
452 }
453
454 public JExpressionIF forIncrementExpressionOnly(IncrementExpression that, JExpressionIF value_result) {
455 return defaultCase(that);
456 }
457
458 public JExpressionIF forPrefixIncrementExpressionOnly(PrefixIncrementExpression that, JExpressionIF value_result) {
459 return defaultCase(that);
460 }
461
462 public JExpressionIF forPositivePrefixIncrementExpressionOnly(PositivePrefixIncrementExpression that, JExpressionIF value_result) {
463 return new PositivePrefixIncrementExpression(that.getSourceInfo(), (Expression)value_result);
464 }
465
466 public JExpressionIF forNegativePrefixIncrementExpressionOnly(NegativePrefixIncrementExpression that, JExpressionIF value_result) {
467 return new NegativePrefixIncrementExpression(that.getSourceInfo(), (Expression)value_result);
468 }
469
470 public JExpressionIF forPostfixIncrementExpressionOnly(PostfixIncrementExpression that, JExpressionIF value_result) {
471 return defaultCase(that);
472 }
473
474 public JExpressionIF forPositivePostfixIncrementExpressionOnly(PositivePostfixIncrementExpression that, JExpressionIF value_result) {
475 return new PositivePostfixIncrementExpression(that.getSourceInfo(), (Expression)value_result);
476 }
477
478 public JExpressionIF forNegativePostfixIncrementExpressionOnly(NegativePostfixIncrementExpression that, JExpressionIF value_result) {
479 return new NegativePostfixIncrementExpression(that.getSourceInfo(), (Expression)value_result);
480 }
481
482 public JExpressionIF forNumericUnaryExpressionOnly(NumericUnaryExpression that, JExpressionIF value_result) {
483 return defaultCase(that);
484 }
485
486 public JExpressionIF forPositiveExpressionOnly(PositiveExpression that, JExpressionIF value_result) {
487 return new PositiveExpression(that.getSourceInfo(), (Expression)value_result);
488 }
489
490 public JExpressionIF forNegativeExpressionOnly(NegativeExpression that, JExpressionIF value_result) {
491 return new NegativeExpression(that.getSourceInfo(), (Expression)value_result);
492 }
493
494 public JExpressionIF forBitwiseNotExpressionOnly(BitwiseNotExpression that, JExpressionIF value_result) {
495 return new BitwiseNotExpression(that.getSourceInfo(), (Expression)value_result);
496 }
497
498 public JExpressionIF forNotExpressionOnly(NotExpression that, JExpressionIF value_result) {
499 return new NotExpression(that.getSourceInfo(), (Expression)value_result);
500 }
501
502 public JExpressionIF forConditionalExpressionOnly(ConditionalExpression that, JExpressionIF condition_result, JExpressionIF forTrue_result, JExpressionIF forFalse_result) {
503 return new ConditionalExpression(that.getSourceInfo(), (Expression)condition_result, (Expression)forTrue_result, (Expression)forFalse_result);
504 }
505
506 public JExpressionIF forInstanceofExpressionOnly(InstanceofExpression that, JExpressionIF value_result, JExpressionIF type_result) {
507 return new InstanceofExpression(that.getSourceInfo(), (Expression)value_result, (Type)type_result);
508 }
509
510 public JExpressionIF forCastExpressionOnly(CastExpression that, JExpressionIF type_result, JExpressionIF value_result) {
511 return new CastExpression(that.getSourceInfo(), (Type)type_result, (Expression)value_result);
512 }
513
514 public JExpressionIF forPrimaryOnly(Primary that) {
515 return defaultCase(that);
516 }
517
518 public JExpressionIF forLexicalLiteralOnly(LexicalLiteral that) {
519 return defaultCase(that);
520 }
521
522 public JExpressionIF forIntegerLiteralOnly(IntegerLiteral that) {
523 return new IntegerLiteral(that.getSourceInfo(), that.getValue());
524 }
525
526 public JExpressionIF forLongLiteralOnly(LongLiteral that) {
527 return new LongLiteral(that.getSourceInfo(), that.getValue());
528 }
529
530 public JExpressionIF forDoubleLiteralOnly(DoubleLiteral that) {
531 return new DoubleLiteral(that.getSourceInfo(), that.getValue());
532 }
533
534 public JExpressionIF forFloatLiteralOnly(FloatLiteral that) {
535 return new FloatLiteral(that.getSourceInfo(), that.getValue());
536 }
537
538 public JExpressionIF forBooleanLiteralOnly(BooleanLiteral that) {
539 return new BooleanLiteral(that.getSourceInfo(), that.isValue());
540 }
541
542 public JExpressionIF forCharLiteralOnly(CharLiteral that) {
543 return new CharLiteral(that.getSourceInfo(), that.getValue());
544 }
545
546 public JExpressionIF forStringLiteralOnly(StringLiteral that) {
547 return new StringLiteral(that.getSourceInfo(), that.getValue());
548 }
549
550 public JExpressionIF forNullLiteralOnly(NullLiteral that) {
551 return new NullLiteral(that.getSourceInfo());
552 }
553
554 public JExpressionIF forInstantiationOnly(Instantiation that) {
555 return defaultCase(that);
556 }
557
558 public JExpressionIF forClassInstantiationOnly(ClassInstantiation that, JExpressionIF type_result, JExpressionIF arguments_result) {
559 return defaultCase(that);
560 }
561
562 public JExpressionIF forNamedClassInstantiationOnly(NamedClassInstantiation that, JExpressionIF type_result, JExpressionIF arguments_result) {
563 return defaultCase(that);
564 }
565
566 public JExpressionIF forSimpleNamedClassInstantiationOnly(SimpleNamedClassInstantiation that, JExpressionIF type_result, JExpressionIF arguments_result) {
567 return new SimpleNamedClassInstantiation(that.getSourceInfo(), (Type)type_result, (ParenthesizedExpressionList)arguments_result);
568 }
569
570 public JExpressionIF forComplexNamedClassInstantiationOnly(ComplexNamedClassInstantiation that, JExpressionIF enclosing_result, JExpressionIF type_result, JExpressionIF arguments_result) {
571 return new ComplexNamedClassInstantiation(that.getSourceInfo(), (Expression)enclosing_result, (Type)type_result, (ParenthesizedExpressionList)arguments_result);
572 }
573
574 public JExpressionIF forAnonymousClassInstantiationOnly(AnonymousClassInstantiation that, JExpressionIF type_result, JExpressionIF arguments_result, JExpressionIF body_result) {
575 return defaultCase(that);
576 }
577
578 public JExpressionIF forSimpleAnonymousClassInstantiationOnly(SimpleAnonymousClassInstantiation that, JExpressionIF type_result, JExpressionIF arguments_result, JExpressionIF body_result) {
579 return new SimpleAnonymousClassInstantiation(that.getSourceInfo(), (Type)type_result, (ParenthesizedExpressionList)arguments_result, (BracedBody)body_result);
580 }
581
582 public JExpressionIF forComplexAnonymousClassInstantiationOnly(ComplexAnonymousClassInstantiation that, JExpressionIF enclosing_result, JExpressionIF type_result, JExpressionIF arguments_result, JExpressionIF body_result) {
583 return new ComplexAnonymousClassInstantiation(that.getSourceInfo(), (Expression)enclosing_result, (Type)type_result, (ParenthesizedExpressionList)arguments_result, (BracedBody)body_result);
584 }
585
586 public JExpressionIF forArrayInstantiationOnly(ArrayInstantiation that, JExpressionIF type_result) {
587 return defaultCase(that);
588 }
589
590 public JExpressionIF forUninitializedArrayInstantiationOnly(UninitializedArrayInstantiation that, JExpressionIF type_result, JExpressionIF dimensionSizes_result) {
591 return defaultCase(that);
592 }
593
594 public JExpressionIF forSimpleUninitializedArrayInstantiationOnly(SimpleUninitializedArrayInstantiation that, JExpressionIF type_result, JExpressionIF dimensionSizes_result) {
595 return new SimpleUninitializedArrayInstantiation(that.getSourceInfo(), (Type)type_result, (DimensionExpressionList)dimensionSizes_result);
596 }
597
598 public JExpressionIF forComplexUninitializedArrayInstantiationOnly(ComplexUninitializedArrayInstantiation that, JExpressionIF enclosing_result, JExpressionIF type_result, JExpressionIF dimensionSizes_result) {
599 return new ComplexUninitializedArrayInstantiation(that.getSourceInfo(), (Expression)enclosing_result, (Type)type_result, (DimensionExpressionList)dimensionSizes_result);
600 }
601
602 public JExpressionIF forInitializedArrayInstantiationOnly(InitializedArrayInstantiation that, JExpressionIF type_result, JExpressionIF initializer_result) {
603 return defaultCase(that);
604 }
605
606 public JExpressionIF forSimpleInitializedArrayInstantiationOnly(SimpleInitializedArrayInstantiation that, JExpressionIF type_result, JExpressionIF initializer_result) {
607 return new SimpleInitializedArrayInstantiation(that.getSourceInfo(), (Type)type_result, (ArrayInitializer)initializer_result);
608 }
609
610 public JExpressionIF forComplexInitializedArrayInstantiationOnly(ComplexInitializedArrayInstantiation that, JExpressionIF enclosing_result, JExpressionIF type_result, JExpressionIF initializer_result) {
611 return new ComplexInitializedArrayInstantiation(that.getSourceInfo(), (Expression)enclosing_result, (Type)type_result, (ArrayInitializer)initializer_result);
612 }
613
614 public JExpressionIF forVariableReferenceOnly(VariableReference that) {
615 return defaultCase(that);
616 }
617
618 public JExpressionIF forNameReferenceOnly(NameReference that, JExpressionIF name_result) {
619 return defaultCase(that);
620 }
621
622 public JExpressionIF forSimpleNameReferenceOnly(SimpleNameReference that, JExpressionIF name_result) {
623 return new SimpleNameReference(that.getSourceInfo(), (Word)name_result);
624 }
625
626 public JExpressionIF forComplexNameReferenceOnly(ComplexNameReference that, JExpressionIF enclosing_result, JExpressionIF name_result) {
627 return new ComplexNameReference(that.getSourceInfo(), (Expression)enclosing_result, (Word)name_result);
628 }
629
630 public JExpressionIF forThisReferenceOnly(ThisReference that) {
631 return defaultCase(that);
632 }
633
634 public JExpressionIF forSimpleThisReferenceOnly(SimpleThisReference that) {
635 return new SimpleThisReference(that.getSourceInfo());
636 }
637
638 public JExpressionIF forComplexThisReferenceOnly(ComplexThisReference that, JExpressionIF enclosing_result) {
639 return new ComplexThisReference(that.getSourceInfo(), (Expression)enclosing_result);
640 }
641
642 public JExpressionIF forSuperReferenceOnly(SuperReference that) {
643 return defaultCase(that);
644 }
645
646 public JExpressionIF forSimpleSuperReferenceOnly(SimpleSuperReference that) {
647 return new SimpleSuperReference(that.getSourceInfo());
648 }
649
650 public JExpressionIF forComplexSuperReferenceOnly(ComplexSuperReference that, JExpressionIF enclosing_result) {
651 return new ComplexSuperReference(that.getSourceInfo(), (Expression)enclosing_result);
652 }
653
654 public JExpressionIF forFunctionInvocationOnly(FunctionInvocation that, JExpressionIF arguments_result) {
655 return defaultCase(that);
656 }
657
658 public JExpressionIF forMethodInvocationOnly(MethodInvocation that, JExpressionIF arguments_result, JExpressionIF name_result) {
659 return defaultCase(that);
660 }
661
662 public JExpressionIF forSimpleMethodInvocationOnly(SimpleMethodInvocation that, JExpressionIF name_result, JExpressionIF arguments_result) {
663 return new SimpleMethodInvocation(that.getSourceInfo(), (Word)name_result, (ParenthesizedExpressionList)arguments_result);
664 }
665
666 public JExpressionIF forComplexMethodInvocationOnly(ComplexMethodInvocation that, JExpressionIF enclosing_result, JExpressionIF name_result, JExpressionIF arguments_result) {
667 return new ComplexMethodInvocation(that.getSourceInfo(), (Expression)enclosing_result, (Word)name_result, (ParenthesizedExpressionList)arguments_result);
668 }
669
670 public JExpressionIF forThisConstructorInvocationOnly(ThisConstructorInvocation that, JExpressionIF arguments_result) {
671 return defaultCase(that);
672 }
673
674 public JExpressionIF forSimpleThisConstructorInvocationOnly(SimpleThisConstructorInvocation that, JExpressionIF arguments_result) {
675 return new SimpleThisConstructorInvocation(that.getSourceInfo(), (ParenthesizedExpressionList)arguments_result);
676 }
677
678 public JExpressionIF forComplexThisConstructorInvocationOnly(ComplexThisConstructorInvocation that, JExpressionIF enclosing_result, JExpressionIF arguments_result) {
679 return new ComplexThisConstructorInvocation(that.getSourceInfo(), (Expression)enclosing_result, (ParenthesizedExpressionList)arguments_result);
680 }
681
682 public JExpressionIF forSuperConstructorInvocationOnly(SuperConstructorInvocation that, JExpressionIF arguments_result) {
683 return defaultCase(that);
684 }
685
686 public JExpressionIF forSimpleSuperConstructorInvocationOnly(SimpleSuperConstructorInvocation that, JExpressionIF arguments_result) {
687 return new SimpleSuperConstructorInvocation(that.getSourceInfo(), (ParenthesizedExpressionList)arguments_result);
688 }
689
690 public JExpressionIF forComplexSuperConstructorInvocationOnly(ComplexSuperConstructorInvocation that, JExpressionIF enclosing_result, JExpressionIF arguments_result) {
691 return new ComplexSuperConstructorInvocation(that.getSourceInfo(), (Expression)enclosing_result, (ParenthesizedExpressionList)arguments_result);
692 }
693
694 public JExpressionIF forClassLiteralOnly(ClassLiteral that, JExpressionIF type_result) {
695 return new ClassLiteral(that.getSourceInfo(), (ReturnTypeI)type_result);
696 }
697
698 public JExpressionIF forArrayAccessOnly(ArrayAccess that, JExpressionIF array_result, JExpressionIF index_result) {
699 return new ArrayAccess(that.getSourceInfo(), (Expression)array_result, (Expression)index_result);
700 }
701
702 public JExpressionIF forParenthesizedOnly(Parenthesized that, JExpressionIF value_result) {
703 return new Parenthesized(that.getSourceInfo(), (Expression)value_result);
704 }
705
706 public JExpressionIF forEmptyExpressionOnly(EmptyExpression that) {
707 return new EmptyExpression(that.getSourceInfo());
708 }
709
710 public JExpressionIF forBodyOnly(Body that, JExpressionIF[] statements_result) {
711 return defaultCase(that);
712 }
713
714 public JExpressionIF forBracedBodyOnly(BracedBody that, JExpressionIF[] statements_result) {
715 return new BracedBody(that.getSourceInfo(), (BodyItemI[])statements_result);
716 }
717
718 public JExpressionIF forUnbracedBodyOnly(UnbracedBody that, JExpressionIF[] statements_result) {
719 return new UnbracedBody(that.getSourceInfo(), (BodyItemI[])statements_result);
720 }
721
722 public JExpressionIF forExpressionListOnly(ExpressionList that, JExpressionIF[] expressions_result) {
723 return defaultCase(that);
724 }
725
726 public JExpressionIF forParenthesizedExpressionListOnly(ParenthesizedExpressionList that, JExpressionIF[] expressions_result) {
727 return new ParenthesizedExpressionList(that.getSourceInfo(), (Expression[])expressions_result);
728 }
729
730 public JExpressionIF forUnparenthesizedExpressionListOnly(UnparenthesizedExpressionList that, JExpressionIF[] expressions_result) {
731 return new UnparenthesizedExpressionList(that.getSourceInfo(), (Expression[])expressions_result);
732 }
733
734 public JExpressionIF forDimensionExpressionListOnly(DimensionExpressionList that, JExpressionIF[] expressions_result) {
735 return new DimensionExpressionList(that.getSourceInfo(), (Expression[])expressions_result);
736 }
737
738 public JExpressionIF forEmptyForConditionOnly(EmptyForCondition that) {
739 return new EmptyForCondition(that.getSourceInfo());
740 }
741
742
743 /** Implementation of JExpressionIFDepthFirstVisitor methods to implement depth-first traversal. */
744 public JExpressionIF forSourceFile(SourceFile that) {
745 final JExpressionIF[] packageStatements_result = new PackageStatement[that.getPackageStatements().length];
746 for (int i = 0; i < that.getPackageStatements().length; i++) {
747 packageStatements_result[i] = (PackageStatement)that.getPackageStatements()[i].visit(this);
748 }
749 final JExpressionIF[] importStatements_result = new ImportStatement[that.getImportStatements().length];
750 for (int i = 0; i < that.getImportStatements().length; i++) {
751 importStatements_result[i] = (ImportStatement)that.getImportStatements()[i].visit(this);
752 }
753 final JExpressionIF[] types_result = new TypeDefBase[that.getTypes().length];
754 for (int i = 0; i < that.getTypes().length; i++) {
755 types_result[i] = (TypeDefBase)that.getTypes()[i].visit(this);
756 }
757 return forSourceFileOnly(that, packageStatements_result, importStatements_result, types_result);
758 }
759
760 public JExpressionIF forModifiersAndVisibility(ModifiersAndVisibility that) {
761 return forModifiersAndVisibilityOnly(that);
762 }
763
764 public JExpressionIF forCompoundWord(CompoundWord that) {
765 final JExpressionIF[] words_result = new Word[that.getWords().length];
766 for (int i = 0; i < that.getWords().length; i++) {
767 words_result[i] = (Word)that.getWords()[i].visit(this);
768 }
769 return forCompoundWordOnly(that, words_result);
770 }
771
772 public JExpressionIF forWord(Word that) {
773 return forWordOnly(that);
774 }
775
776 public JExpressionIF forClassDef(ClassDef that) {
777 final JExpressionIF mav_result = that.getMav().visit(this);
778 final JExpressionIF name_result = that.getName().visit(this);
779 final JExpressionIF[] typeParameters_result = new TypeParameter[that.getTypeParameters().length];
780 for (int i = 0; i < that.getTypeParameters().length; i++) {
781 typeParameters_result[i] = (TypeParameter)that.getTypeParameters()[i].visit(this);
782 }
783 final JExpressionIF superclass_result = that.getSuperclass().visit(this);
784 final JExpressionIF[] interfaces_result = new ReferenceType[that.getInterfaces().length];
785 for (int i = 0; i < that.getInterfaces().length; i++) {
786 interfaces_result[i] = (ReferenceType)that.getInterfaces()[i].visit(this);
787 }
788 final JExpressionIF body_result = that.getBody().visit(this);
789 return forClassDefOnly(that, mav_result, name_result, typeParameters_result, superclass_result, interfaces_result, body_result);
790 }
791
792 public JExpressionIF forInnerClassDef(InnerClassDef that) {
793 final JExpressionIF mav_result = that.getMav().visit(this);
794 final JExpressionIF name_result = that.getName().visit(this);
795 final JExpressionIF[] typeParameters_result = new TypeParameter[that.getTypeParameters().length];
796 for (int i = 0; i < that.getTypeParameters().length; i++) {
797 typeParameters_result[i] = (TypeParameter)that.getTypeParameters()[i].visit(this);
798 }
799 final JExpressionIF superclass_result = that.getSuperclass().visit(this);
800 final JExpressionIF[] interfaces_result = new ReferenceType[that.getInterfaces().length];
801 for (int i = 0; i < that.getInterfaces().length; i++) {
802 interfaces_result[i] = (ReferenceType)that.getInterfaces()[i].visit(this);
803 }
804 final JExpressionIF body_result = that.getBody().visit(this);
805 return forInnerClassDefOnly(that, mav_result, name_result, typeParameters_result, superclass_result, interfaces_result, body_result);
806 }
807
808 public JExpressionIF forInterfaceDef(InterfaceDef that) {
809 final JExpressionIF mav_result = that.getMav().visit(this);
810 final JExpressionIF name_result = that.getName().visit(this);
811 final JExpressionIF[] typeParameters_result = new TypeParameter[that.getTypeParameters().length];
812 for (int i = 0; i < that.getTypeParameters().length; i++) {
813 typeParameters_result[i] = (TypeParameter)that.getTypeParameters()[i].visit(this);
814 }
815 final JExpressionIF[] interfaces_result = new ReferenceType[that.getInterfaces().length];
816 for (int i = 0; i < that.getInterfaces().length; i++) {
817 interfaces_result[i] = (ReferenceType)that.getInterfaces()[i].visit(this);
818 }
819 final JExpressionIF body_result = that.getBody().visit(this);
820 return forInterfaceDefOnly(that, mav_result, name_result, typeParameters_result, interfaces_result, body_result);
821 }
822
823 public JExpressionIF forInnerInterfaceDef(InnerInterfaceDef that) {
824 final JExpressionIF mav_result = that.getMav().visit(this);
825 final JExpressionIF name_result = that.getName().visit(this);
826 final JExpressionIF[] typeParameters_result = new TypeParameter[that.getTypeParameters().length];
827 for (int i = 0; i < that.getTypeParameters().length; i++) {
828 typeParameters_result[i] = (TypeParameter)that.getTypeParameters()[i].visit(this);
829 }
830 final JExpressionIF[] interfaces_result = new ReferenceType[that.getInterfaces().length];
831 for (int i = 0; i < that.getInterfaces().length; i++) {
832 interfaces_result[i] = (ReferenceType)that.getInterfaces()[i].visit(this);
833 }
834 final JExpressionIF body_result = that.getBody().visit(this);
835 return forInnerInterfaceDefOnly(that, mav_result, name_result, typeParameters_result, interfaces_result, body_result);
836 }
837
838 public JExpressionIF forConstructorDef(ConstructorDef that) {
839 final JExpressionIF name_result = that.getName().visit(this);
840 final JExpressionIF mav_result = that.getMav().visit(this);
841 final JExpressionIF[] parameters_result = new FormalParameter[that.getParameters().length];
842 for (int i = 0; i < that.getParameters().length; i++) {
843 parameters_result[i] = (FormalParameter)that.getParameters()[i].visit(this);
844 }
845 final JExpressionIF[] throws_result = new ReferenceType[that.getThrows().length];
846 for (int i = 0; i < that.getThrows().length; i++) {
847 throws_result[i] = (ReferenceType)that.getThrows()[i].visit(this);
848 }
849 final JExpressionIF statements_result = that.getStatements().visit(this);
850 return forConstructorDefOnly(that, name_result, mav_result, parameters_result, throws_result, statements_result);
851 }
852
853 public JExpressionIF forInstanceInitializer(InstanceInitializer that) {
854 final JExpressionIF code_result = that.getCode().visit(this);
855 return forInstanceInitializerOnly(that, code_result);
856 }
857
858 public JExpressionIF forStaticInitializer(StaticInitializer that) {
859 final JExpressionIF code_result = that.getCode().visit(this);
860 return forStaticInitializerOnly(that, code_result);
861 }
862
863 public JExpressionIF forPackageStatement(PackageStatement that) {
864 final JExpressionIF cWord_result = that.getCWord().visit(this);
865 return forPackageStatementOnly(that, cWord_result);
866 }
867
868 public JExpressionIF forClassImportStatement(ClassImportStatement that) {
869 final JExpressionIF cWord_result = that.getCWord().visit(this);
870 return forClassImportStatementOnly(that, cWord_result);
871 }
872
873 public JExpressionIF forPackageImportStatement(PackageImportStatement that) {
874 final JExpressionIF cWord_result = that.getCWord().visit(this);
875 return forPackageImportStatementOnly(that, cWord_result);
876 }
877
878 public JExpressionIF forLabeledStatement(LabeledStatement that) {
879 final JExpressionIF label_result = that.getLabel().visit(this);
880 final JExpressionIF statement_result = that.getStatement().visit(this);
881 return forLabeledStatementOnly(that, label_result, statement_result);
882 }
883
884 public JExpressionIF forBlock(Block that) {
885 final JExpressionIF statements_result = that.getStatements().visit(this);
886 return forBlockOnly(that, statements_result);
887 }
888
889 public JExpressionIF forExpressionStatement(ExpressionStatement that) {
890 final JExpressionIF expression_result = that.getExpression().visit(this);
891 return forExpressionStatementOnly(that, expression_result);
892 }
893
894 public JExpressionIF forSwitchStatement(SwitchStatement that) {
895 final JExpressionIF test_result = that.getTest().visit(this);
896 final JExpressionIF[] cases_result = new SwitchCase[that.getCases().length];
897 for (int i = 0; i < that.getCases().length; i++) {
898 cases_result[i] = (SwitchCase)that.getCases()[i].visit(this);
899 }
900 return forSwitchStatementOnly(that, test_result, cases_result);
901 }
902
903 public JExpressionIF forIfThenStatement(IfThenStatement that) {
904 final JExpressionIF testExpression_result = that.getTestExpression().visit(this);
905 final JExpressionIF thenStatement_result = that.getThenStatement().visit(this);
906 return forIfThenStatementOnly(that, testExpression_result, thenStatement_result);
907 }
908
909 public JExpressionIF forIfThenElseStatement(IfThenElseStatement that) {
910 final JExpressionIF testExpression_result = that.getTestExpression().visit(this);
911 final JExpressionIF thenStatement_result = that.getThenStatement().visit(this);
912 final JExpressionIF elseStatement_result = that.getElseStatement().visit(this);
913 return forIfThenElseStatementOnly(that, testExpression_result, thenStatement_result, elseStatement_result);
914 }
915
916 public JExpressionIF forWhileStatement(WhileStatement that) {
917 final JExpressionIF condition_result = that.getCondition().visit(this);
918 final JExpressionIF code_result = that.getCode().visit(this);
919 return forWhileStatementOnly(that, condition_result, code_result);
920 }
921
922 public JExpressionIF forDoStatement(DoStatement that) {
923 final JExpressionIF code_result = that.getCode().visit(this);
924 final JExpressionIF condition_result = that.getCondition().visit(this);
925 return forDoStatementOnly(that, code_result, condition_result);
926 }
927
928 public JExpressionIF forForStatement(ForStatement that) {
929 final JExpressionIF init_result = that.getInit().visit(this);
930 final JExpressionIF condition_result = that.getCondition().visit(this);
931 final JExpressionIF update_result = that.getUpdate().visit(this);
932 final JExpressionIF code_result = that.getCode().visit(this);
933 return forForStatementOnly(that, init_result, condition_result, update_result, code_result);
934 }
935
936 public JExpressionIF forLabeledBreakStatement(LabeledBreakStatement that) {
937 final JExpressionIF label_result = that.getLabel().visit(this);
938 return forLabeledBreakStatementOnly(that, label_result);
939 }
940
941 public JExpressionIF forUnlabeledBreakStatement(UnlabeledBreakStatement that) {
942 return forUnlabeledBreakStatementOnly(that);
943 }
944
945 public JExpressionIF forLabeledContinueStatement(LabeledContinueStatement that) {
946 final JExpressionIF label_result = that.getLabel().visit(this);
947 return forLabeledContinueStatementOnly(that, label_result);
948 }
949
950 public JExpressionIF forUnlabeledContinueStatement(UnlabeledContinueStatement that) {
951 return forUnlabeledContinueStatementOnly(that);
952 }
953
954 public JExpressionIF forVoidReturnStatement(VoidReturnStatement that) {
955 return forVoidReturnStatementOnly(that);
956 }
957
958 public JExpressionIF forValueReturnStatement(ValueReturnStatement that) {
959 final JExpressionIF value_result = that.getValue().visit(this);
960 return forValueReturnStatementOnly(that, value_result);
961 }
962
963 public JExpressionIF forThrowStatement(ThrowStatement that) {
964 final JExpressionIF thrown_result = that.getThrown().visit(this);
965 return forThrowStatementOnly(that, thrown_result);
966 }
967
968 public JExpressionIF forSynchronizedStatement(SynchronizedStatement that) {
969 final JExpressionIF lockExpr_result = that.getLockExpr().visit(this);
970 final JExpressionIF block_result = that.getBlock().visit(this);
971 return forSynchronizedStatementOnly(that, lockExpr_result, block_result);
972 }
973
974 public JExpressionIF forTryCatchFinallyStatement(TryCatchFinallyStatement that) {
975 final JExpressionIF tryBlock_result = that.getTryBlock().visit(this);
976 final JExpressionIF[] catchBlocks_result = new CatchBlock[that.getCatchBlocks().length];
977 for (int i = 0; i < that.getCatchBlocks().length; i++) {
978 catchBlocks_result[i] = (CatchBlock)that.getCatchBlocks()[i].visit(this);
979 }
980 final JExpressionIF finallyBlock_result = that.getFinallyBlock().visit(this);
981 return forTryCatchFinallyStatementOnly(that, tryBlock_result, catchBlocks_result, finallyBlock_result);
982 }
983
984 public JExpressionIF forNormalTryCatchStatement(NormalTryCatchStatement that) {
985 final JExpressionIF tryBlock_result = that.getTryBlock().visit(this);
986 final JExpressionIF[] catchBlocks_result = new CatchBlock[that.getCatchBlocks().length];
987 for (int i = 0; i < that.getCatchBlocks().length; i++) {
988 catchBlocks_result[i] = (CatchBlock)that.getCatchBlocks()[i].visit(this);
989 }
990 return forNormalTryCatchStatementOnly(that, tryBlock_result, catchBlocks_result);
991 }
992
993 public JExpressionIF forEmptyStatement(EmptyStatement that) {
994 return forEmptyStatementOnly(that);
995 }
996
997 public JExpressionIF forConcreteMethodDef(ConcreteMethodDef that) {
998 final JExpressionIF mav_result = that.getMav().visit(this);
999 final JExpressionIF[] typeParams_result = new TypeParameter[that.getTypeParams().length];
1000 for (int i = 0; i < that.getTypeParams().length; i++) {
1001 typeParams_result[i] = (TypeParameter)that.getTypeParams()[i].visit(this);
1002 }
1003 final JExpressionIF result_result = that.getResult().visit(this);
1004 final JExpressionIF name_result = that.getName().visit(this);
1005 final JExpressionIF[] params_result = new FormalParameter[that.getParams().length];
1006 for (int i = 0; i < that.getParams().length; i++) {
1007 params_result[i] = (FormalParameter)that.getParams()[i].visit(this);
1008 }
1009 final JExpressionIF[] throws_result = new ReferenceType[that.getThrows().length];
1010 for (int i = 0; i < that.getThrows().length; i++) {
1011 throws_result[i] = (ReferenceType)that.getThrows()[i].visit(this);
1012 }
1013 final JExpressionIF body_result = that.getBody().visit(this);
1014 return forConcreteMethodDefOnly(that, mav_result, typeParams_result, result_result, name_result, params_result, throws_result, body_result);
1015 }
1016
1017 public JExpressionIF forAbstractMethodDef(AbstractMethodDef that) {
1018 final JExpressionIF mav_result = that.getMav().visit(this);
1019 final JExpressionIF[] typeParams_result = new TypeParameter[that.getTypeParams().length];
1020 for (int i = 0; i < that.getTypeParams().length; i++) {
1021 typeParams_result[i] = (TypeParameter)that.getTypeParams()[i].visit(this);
1022 }
1023 final JExpressionIF result_result = that.getResult().visit(this);
1024 final JExpressionIF name_result = that.getName().visit(this);
1025 final JExpressionIF[] params_result = new FormalParameter[that.getParams().length];
1026 for (int i = 0; i < that.getParams().length; i++) {
1027 params_result[i] = (FormalParameter)that.getParams()[i].visit(this);
1028 }
1029 final JExpressionIF[] throws_result = new ReferenceType[that.getThrows().length];
1030 for (int i = 0; i < that.getThrows().length; i++) {
1031 throws_result[i] = (ReferenceType)that.getThrows()[i].visit(this);
1032 }
1033 return forAbstractMethodDefOnly(that, mav_result, typeParams_result, result_result, name_result, params_result, throws_result);
1034 }
1035
1036 public JExpressionIF forFormalParameter(FormalParameter that) {
1037 final JExpressionIF declarator_result = that.getDeclarator().visit(this);
1038 return forFormalParameterOnly(that, declarator_result);
1039 }
1040
1041 public JExpressionIF forVariableDeclaration(VariableDeclaration that) {
1042 final JExpressionIF mav_result = that.getMav().visit(this);
1043 final JExpressionIF[] declarators_result = new VariableDeclarator[that.getDeclarators().length];
1044 for (int i = 0; i < that.getDeclarators().length; i++) {
1045 declarators_result[i] = (VariableDeclarator)that.getDeclarators()[i].visit(this);
1046 }
1047 return forVariableDeclarationOnly(that, mav_result, declarators_result);
1048 }
1049
1050 public JExpressionIF forUninitializedVariableDeclarator(UninitializedVariableDeclarator that) {
1051 final JExpressionIF type_result = that.getType().visit(this);
1052 final JExpressionIF name_result = that.getName().visit(this);
1053 return forUninitializedVariableDeclaratorOnly(that, type_result, name_result);
1054 }
1055
1056 public JExpressionIF forInitializedVariableDeclarator(InitializedVariableDeclarator that) {
1057 final JExpressionIF type_result = that.getType().visit(this);
1058 final JExpressionIF name_result = that.getName().visit(this);
1059 final JExpressionIF initializer_result = that.getInitializer().visit(this);
1060 return forInitializedVariableDeclaratorOnly(that, type_result, name_result, initializer_result);
1061 }
1062
1063 public JExpressionIF forTypeParameter(TypeParameter that) {
1064 final JExpressionIF variable_result = that.getVariable().visit(this);
1065 final JExpressionIF bound_result = that.getBound().visit(this);
1066 return forTypeParameterOnly(that, variable_result, bound_result);
1067 }
1068
1069 public JExpressionIF forArrayInitializer(ArrayInitializer that) {
1070 final JExpressionIF[] items_result = new VariableInitializerI[that.getItems().length];
1071 for (int i = 0; i < that.getItems().length; i++) {
1072 items_result[i] = (VariableInitializerI)that.getItems()[i].visit(this);
1073 }
1074 return forArrayInitializerOnly(that, items_result);
1075 }
1076
1077 public JExpressionIF forPrimitiveType(PrimitiveType that) {
1078 return forPrimitiveTypeOnly(that);
1079 }
1080
1081 public JExpressionIF forArrayType(ArrayType that) {
1082 final JExpressionIF elementType_result = that.getElementType().visit(this);
1083 return forArrayTypeOnly(that, elementType_result);
1084 }
1085
1086 public JExpressionIF forMemberType(MemberType that) {
1087 final JExpressionIF left_result = that.getLeft().visit(this);
1088 final JExpressionIF right_result = that.getRight().visit(this);
1089 return forMemberTypeOnly(that, left_result, right_result);
1090 }
1091
1092 public JExpressionIF forClassOrInterfaceType(ClassOrInterfaceType that) {
1093 final JExpressionIF[] typeArguments_result = new Type[that.getTypeArguments().length];
1094 for (int i = 0; i < that.getTypeArguments().length; i++) {
1095 typeArguments_result[i] = (Type)that.getTypeArguments()[i].visit(this);
1096 }
1097 return forClassOrInterfaceTypeOnly(that, typeArguments_result);
1098 }
1099
1100 public JExpressionIF forTypeVariable(TypeVariable that) {
1101 return forTypeVariableOnly(that);
1102 }
1103
1104 public JExpressionIF forVoidReturn(VoidReturn that) {
1105 return forVoidReturnOnly(that);
1106 }
1107
1108 public JExpressionIF forLabeledCase(LabeledCase that) {
1109 final JExpressionIF label_result = that.getLabel().visit(this);
1110 final JExpressionIF code_result = that.getCode().visit(this);
1111 return forLabeledCaseOnly(that, label_result, code_result);
1112 }
1113
1114 public JExpressionIF forDefaultCase(DefaultCase that) {
1115 final JExpressionIF code_result = that.getCode().visit(this);
1116 return forDefaultCaseOnly(that, code_result);
1117 }
1118
1119 public JExpressionIF forCatchBlock(CatchBlock that) {
1120 final JExpressionIF exception_result = that.getException().visit(this);
1121 final JExpressionIF block_result = that.getBlock().visit(this);
1122 return forCatchBlockOnly(that, exception_result, block_result);
1123 }
1124
1125 public JExpressionIF forSimpleAssignmentExpression(SimpleAssignmentExpression that) {
1126 final JExpressionIF name_result = that.getName().visit(this);
1127 final JExpressionIF value_result = that.getValue().visit(this);
1128 return forSimpleAssignmentExpressionOnly(that, name_result, value_result);
1129 }
1130
1131 public JExpressionIF forPlusAssignmentExpression(PlusAssignmentExpression that) {
1132 final JExpressionIF name_result = that.getName().visit(this);
1133 final JExpressionIF value_result = that.getValue().visit(this);
1134 return forPlusAssignmentExpressionOnly(that, name_result, value_result);
1135 }
1136
1137 public JExpressionIF forMinusAssignmentExpression(MinusAssignmentExpression that) {
1138 final JExpressionIF name_result = that.getName().visit(this);
1139 final JExpressionIF value_result = that.getValue().visit(this);
1140 return forMinusAssignmentExpressionOnly(that, name_result, value_result);
1141 }
1142
1143 public JExpressionIF forMultiplyAssignmentExpression(MultiplyAssignmentExpression that) {
1144 final JExpressionIF name_result = that.getName().visit(this);
1145 final JExpressionIF value_result = that.getValue().visit(this);
1146 return forMultiplyAssignmentExpressionOnly(that, name_result, value_result);
1147 }
1148
1149 public JExpressionIF forDivideAssignmentExpression(DivideAssignmentExpression that) {
1150 final JExpressionIF name_result = that.getName().visit(this);
1151 final JExpressionIF value_result = that.getValue().visit(this);
1152 return forDivideAssignmentExpressionOnly(that, name_result, value_result);
1153 }
1154
1155 public JExpressionIF forModAssignmentExpression(ModAssignmentExpression that) {
1156 final JExpressionIF name_result = that.getName().visit(this);
1157 final JExpressionIF value_result = that.getValue().visit(this);
1158 return forModAssignmentExpressionOnly(that, name_result, value_result);
1159 }
1160
1161 public JExpressionIF forLeftShiftAssignmentExpression(LeftShiftAssignmentExpression that) {
1162 final JExpressionIF name_result = that.getName().visit(this);
1163 final JExpressionIF value_result = that.getValue().visit(this);
1164 return forLeftShiftAssignmentExpressionOnly(that, name_result, value_result);
1165 }
1166
1167 public JExpressionIF forRightSignedShiftAssignmentExpression(RightSignedShiftAssignmentExpression that) {
1168 final JExpressionIF name_result = that.getName().visit(this);
1169 final JExpressionIF value_result = that.getValue().visit(this);
1170 return forRightSignedShiftAssignmentExpressionOnly(that, name_result, value_result);
1171 }
1172
1173 public JExpressionIF forRightUnsignedShiftAssignmentExpression(RightUnsignedShiftAssignmentExpression that) {
1174 final JExpressionIF name_result = that.getName().visit(this);
1175 final JExpressionIF value_result = that.getValue().visit(this);
1176 return forRightUnsignedShiftAssignmentExpressionOnly(that, name_result, value_result);
1177 }
1178
1179 public JExpressionIF forBitwiseAndAssignmentExpression(BitwiseAndAssignmentExpression that) {
1180 final JExpressionIF name_result = that.getName().visit(this);
1181 final JExpressionIF value_result = that.getValue().visit(this);
1182 return forBitwiseAndAssignmentExpressionOnly(that, name_result, value_result);
1183 }
1184
1185 public JExpressionIF forBitwiseOrAssignmentExpression(BitwiseOrAssignmentExpression that) {
1186 final JExpressionIF name_result = that.getName().visit(this);
1187 final JExpressionIF value_result = that.getValue().visit(this);
1188 return forBitwiseOrAssignmentExpressionOnly(that, name_result, value_result);
1189 }
1190
1191 public JExpressionIF forBitwiseXorAssignmentExpression(BitwiseXorAssignmentExpression that) {
1192 final JExpressionIF name_result = that.getName().visit(this);
1193 final JExpressionIF value_result = that.getValue().visit(this);
1194 return forBitwiseXorAssignmentExpressionOnly(that, name_result, value_result);
1195 }
1196
1197 public JExpressionIF forOrExpression(OrExpression that) {
1198 final JExpressionIF left_result = that.getLeft().visit(this);
1199 final JExpressionIF right_result = that.getRight().visit(this);
1200 return forOrExpressionOnly(that, left_result, right_result);
1201 }
1202
1203 public JExpressionIF forAndExpression(AndExpression that) {
1204 final JExpressionIF left_result = that.getLeft().visit(this);
1205 final JExpressionIF right_result = that.getRight().visit(this);
1206 return forAndExpressionOnly(that, left_result, right_result);
1207 }
1208
1209 public JExpressionIF forBitwiseOrExpression(BitwiseOrExpression that) {
1210 final JExpressionIF left_result = that.getLeft().visit(this);
1211 final JExpressionIF right_result = that.getRight().visit(this);
1212 return forBitwiseOrExpressionOnly(that, left_result, right_result);
1213 }
1214
1215 public JExpressionIF forBitwiseXorExpression(BitwiseXorExpression that) {
1216 final JExpressionIF left_result = that.getLeft().visit(this);
1217 final JExpressionIF right_result = that.getRight().visit(this);
1218 return forBitwiseXorExpressionOnly(that, left_result, right_result);
1219 }
1220
1221 public JExpressionIF forBitwiseAndExpression(BitwiseAndExpression that) {
1222 final JExpressionIF left_result = that.getLeft().visit(this);
1223 final JExpressionIF right_result = that.getRight().visit(this);
1224 return forBitwiseAndExpressionOnly(that, left_result, right_result);
1225 }
1226
1227 public JExpressionIF forEqualsExpression(EqualsExpression that) {
1228 final JExpressionIF left_result = that.getLeft().visit(this);
1229 final JExpressionIF right_result = that.getRight().visit(this);
1230 return forEqualsExpressionOnly(that, left_result, right_result);
1231 }
1232
1233 public JExpressionIF forNotEqualExpression(NotEqualExpression that) {
1234 final JExpressionIF left_result = that.getLeft().visit(this);
1235 final JExpressionIF right_result = that.getRight().visit(this);
1236 return forNotEqualExpressionOnly(that, left_result, right_result);
1237 }
1238
1239 public JExpressionIF forLessThanExpression(LessThanExpression that) {
1240 final JExpressionIF left_result = that.getLeft().visit(this);
1241 final JExpressionIF right_result = that.getRight().visit(this);
1242 return forLessThanExpressionOnly(that, left_result, right_result);
1243 }
1244
1245 public JExpressionIF forLessThanOrEqualExpression(LessThanOrEqualExpression that) {
1246 final JExpressionIF left_result = that.getLeft().visit(this);
1247 final JExpressionIF right_result = that.getRight().visit(this);
1248 return forLessThanOrEqualExpressionOnly(that, left_result, right_result);
1249 }
1250
1251 public JExpressionIF forGreaterThanExpression(GreaterThanExpression that) {
1252 final JExpressionIF left_result = that.getLeft().visit(this);
1253 final JExpressionIF right_result = that.getRight().visit(this);
1254 return forGreaterThanExpressionOnly(that, left_result, right_result);
1255 }
1256
1257 public JExpressionIF forGreaterThanOrEqualExpression(GreaterThanOrEqualExpression that) {
1258 final JExpressionIF left_result = that.getLeft().visit(this);
1259 final JExpressionIF right_result = that.getRight().visit(this);
1260 return forGreaterThanOrEqualExpressionOnly(that, left_result, right_result);
1261 }
1262
1263 public JExpressionIF forLeftShiftExpression(LeftShiftExpression that) {
1264 final JExpressionIF left_result = that.getLeft().visit(this);
1265 final JExpressionIF right_result = that.getRight().visit(this);
1266 return forLeftShiftExpressionOnly(that, left_result, right_result);
1267 }
1268
1269 public JExpressionIF forRightSignedShiftExpression(RightSignedShiftExpression that) {
1270 final JExpressionIF left_result = that.getLeft().visit(this);
1271 final JExpressionIF right_result = that.getRight().visit(this);
1272 return forRightSignedShiftExpressionOnly(that, left_result, right_result);
1273 }
1274
1275 public JExpressionIF forRightUnsignedShiftExpression(RightUnsignedShiftExpression that) {
1276 final JExpressionIF left_result = that.getLeft().visit(this);
1277 final JExpressionIF right_result = that.getRight().visit(this);
1278 return forRightUnsignedShiftExpressionOnly(that, left_result, right_result);
1279 }
1280
1281 public JExpressionIF forPlusExpression(PlusExpression that) {
1282 final JExpressionIF left_result = that.getLeft().visit(this);
1283 final JExpressionIF right_result = that.getRight().visit(this);
1284 return forPlusExpressionOnly(that, left_result, right_result);
1285 }
1286
1287 public JExpressionIF forMinusExpression(MinusExpression that) {
1288 final JExpressionIF left_result = that.getLeft().visit(this);
1289 final JExpressionIF right_result = that.getRight().visit(this);
1290 return forMinusExpressionOnly(that, left_result, right_result);
1291 }
1292
1293 public JExpressionIF forMultiplyExpression(MultiplyExpression that) {
1294 final JExpressionIF left_result = that.getLeft().visit(this);
1295 final JExpressionIF right_result = that.getRight().visit(this);
1296 return forMultiplyExpressionOnly(that, left_result, right_result);
1297 }
1298
1299 public JExpressionIF forDivideExpression(DivideExpression that) {
1300 final JExpressionIF left_result = that.getLeft().visit(this);
1301 final JExpressionIF right_result = that.getRight().visit(this);
1302 return forDivideExpressionOnly(that, left_result, right_result);
1303 }
1304
1305 public JExpressionIF forModExpression(ModExpression that) {
1306 final JExpressionIF left_result = that.getLeft().visit(this);
1307 final JExpressionIF right_result = that.getRight().visit(this);
1308 return forModExpressionOnly(that, left_result, right_result);
1309 }
1310
1311 public JExpressionIF forNoOpExpression(NoOpExpression that) {
1312 final JExpressionIF left_result = that.getLeft().visit(this);
1313 final JExpressionIF right_result = that.getRight().visit(this);
1314 return forNoOpExpressionOnly(that, left_result, right_result);
1315 }
1316
1317 public JExpressionIF forPositivePrefixIncrementExpression(PositivePrefixIncrementExpression that) {
1318 final JExpressionIF value_result = that.getValue().visit(this);
1319 return forPositivePrefixIncrementExpressionOnly(that, value_result);
1320 }
1321
1322 public JExpressionIF forNegativePrefixIncrementExpression(NegativePrefixIncrementExpression that) {
1323 final JExpressionIF value_result = that.getValue().visit(this);
1324 return forNegativePrefixIncrementExpressionOnly(that, value_result);
1325 }
1326
1327 public JExpressionIF forPositivePostfixIncrementExpression(PositivePostfixIncrementExpression that) {
1328 final JExpressionIF value_result = that.getValue().visit(this);
1329 return forPositivePostfixIncrementExpressionOnly(that, value_result);
1330 }
1331
1332 public JExpressionIF forNegativePostfixIncrementExpression(NegativePostfixIncrementExpression that) {
1333 final JExpressionIF value_result = that.getValue().visit(this);
1334 return forNegativePostfixIncrementExpressionOnly(that, value_result);
1335 }
1336
1337 public JExpressionIF forPositiveExpression(PositiveExpression that) {
1338 final JExpressionIF value_result = that.getValue().visit(this);
1339 return forPositiveExpressionOnly(that, value_result);
1340 }
1341
1342 public JExpressionIF forNegativeExpression(NegativeExpression that) {
1343 final JExpressionIF value_result = that.getValue().visit(this);
1344 return forNegativeExpressionOnly(that, value_result);
1345 }
1346
1347 public JExpressionIF forBitwiseNotExpression(BitwiseNotExpression that) {
1348 final JExpressionIF value_result = that.getValue().visit(this);
1349 return forBitwiseNotExpressionOnly(that, value_result);
1350 }
1351
1352 public JExpressionIF forNotExpression(NotExpression that) {
1353 final JExpressionIF value_result = that.getValue().visit(this);
1354 return forNotExpressionOnly(that, value_result);
1355 }
1356
1357 public JExpressionIF forConditionalExpression(ConditionalExpression that) {
1358 final JExpressionIF condition_result = that.getCondition().visit(this);
1359 final JExpressionIF forTrue_result = that.getForTrue().visit(this);
1360 final JExpressionIF forFalse_result = that.getForFalse().visit(this);
1361 return forConditionalExpressionOnly(that, condition_result, forTrue_result, forFalse_result);
1362 }
1363
1364 public JExpressionIF forInstanceofExpression(InstanceofExpression that) {
1365 final JExpressionIF value_result = that.getValue().visit(this);
1366 final JExpressionIF type_result = that.getType().visit(this);
1367 return forInstanceofExpressionOnly(that, value_result, type_result);
1368 }
1369
1370 public JExpressionIF forCastExpression(CastExpression that) {
1371 final JExpressionIF type_result = that.getType().visit(this);
1372 final JExpressionIF value_result = that.getValue().visit(this);
1373 return forCastExpressionOnly(that, type_result, value_result);
1374 }
1375
1376 public JExpressionIF forIntegerLiteral(IntegerLiteral that) {
1377 return forIntegerLiteralOnly(that);
1378 }
1379
1380 public JExpressionIF forLongLiteral(LongLiteral that) {
1381 return forLongLiteralOnly(that);
1382 }
1383
1384 public JExpressionIF forDoubleLiteral(DoubleLiteral that) {
1385 return forDoubleLiteralOnly(that);
1386 }
1387
1388 public JExpressionIF forFloatLiteral(FloatLiteral that) {
1389 return forFloatLiteralOnly(that);
1390 }
1391
1392 public JExpressionIF forBooleanLiteral(BooleanLiteral that) {
1393 return forBooleanLiteralOnly(that);
1394 }
1395
1396 public JExpressionIF forCharLiteral(CharLiteral that) {
1397 return forCharLiteralOnly(that);
1398 }
1399
1400 public JExpressionIF forStringLiteral(StringLiteral that) {
1401 return forStringLiteralOnly(that);
1402 }
1403
1404 public JExpressionIF forNullLiteral(NullLiteral that) {
1405 return forNullLiteralOnly(that);
1406 }
1407
1408 public JExpressionIF forSimpleNamedClassInstantiation(SimpleNamedClassInstantiation that) {
1409 final JExpressionIF type_result = that.getType().visit(this);
1410 final JExpressionIF arguments_result = that.getArguments().visit(this);
1411 return forSimpleNamedClassInstantiationOnly(that, type_result, arguments_result);
1412 }
1413
1414 public JExpressionIF forComplexNamedClassInstantiation(ComplexNamedClassInstantiation that) {
1415 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1416 final JExpressionIF type_result = that.getType().visit(this);
1417 final JExpressionIF arguments_result = that.getArguments().visit(this);
1418 return forComplexNamedClassInstantiationOnly(that, enclosing_result, type_result, arguments_result);
1419 }
1420
1421 public JExpressionIF forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that) {
1422 final JExpressionIF type_result = that.getType().visit(this);
1423 final JExpressionIF arguments_result = that.getArguments().visit(this);
1424 final JExpressionIF body_result = that.getBody().visit(this);
1425 return forSimpleAnonymousClassInstantiationOnly(that, type_result, arguments_result, body_result);
1426 }
1427
1428 public JExpressionIF forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that) {
1429 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1430 final JExpressionIF type_result = that.getType().visit(this);
1431 final JExpressionIF arguments_result = that.getArguments().visit(this);
1432 final JExpressionIF body_result = that.getBody().visit(this);
1433 return forComplexAnonymousClassInstantiationOnly(that, enclosing_result, type_result, arguments_result, body_result);
1434 }
1435
1436 public JExpressionIF forSimpleUninitializedArrayInstantiation(SimpleUninitializedArrayInstantiation that) {
1437 final JExpressionIF type_result = that.getType().visit(this);
1438 final JExpressionIF dimensionSizes_result = that.getDimensionSizes().visit(this);
1439 return forSimpleUninitializedArrayInstantiationOnly(that, type_result, dimensionSizes_result);
1440 }
1441
1442 public JExpressionIF forComplexUninitializedArrayInstantiation(ComplexUninitializedArrayInstantiation that) {
1443 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1444 final JExpressionIF type_result = that.getType().visit(this);
1445 final JExpressionIF dimensionSizes_result = that.getDimensionSizes().visit(this);
1446 return forComplexUninitializedArrayInstantiationOnly(that, enclosing_result, type_result, dimensionSizes_result);
1447 }
1448
1449 public JExpressionIF forSimpleInitializedArrayInstantiation(SimpleInitializedArrayInstantiation that) {
1450 final JExpressionIF type_result = that.getType().visit(this);
1451 final JExpressionIF initializer_result = that.getInitializer().visit(this);
1452 return forSimpleInitializedArrayInstantiationOnly(that, type_result, initializer_result);
1453 }
1454
1455 public JExpressionIF forComplexInitializedArrayInstantiation(ComplexInitializedArrayInstantiation that) {
1456 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1457 final JExpressionIF type_result = that.getType().visit(this);
1458 final JExpressionIF initializer_result = that.getInitializer().visit(this);
1459 return forComplexInitializedArrayInstantiationOnly(that, enclosing_result, type_result, initializer_result);
1460 }
1461
1462 public JExpressionIF forSimpleNameReference(SimpleNameReference that) {
1463 final JExpressionIF name_result = that.getName().visit(this);
1464 return forSimpleNameReferenceOnly(that, name_result);
1465 }
1466
1467 public JExpressionIF forComplexNameReference(ComplexNameReference that) {
1468 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1469 final JExpressionIF name_result = that.getName().visit(this);
1470 return forComplexNameReferenceOnly(that, enclosing_result, name_result);
1471 }
1472
1473 public JExpressionIF forSimpleThisReference(SimpleThisReference that) {
1474 return forSimpleThisReferenceOnly(that);
1475 }
1476
1477 public JExpressionIF forComplexThisReference(ComplexThisReference that) {
1478 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1479 return forComplexThisReferenceOnly(that, enclosing_result);
1480 }
1481
1482 public JExpressionIF forSimpleSuperReference(SimpleSuperReference that) {
1483 return forSimpleSuperReferenceOnly(that);
1484 }
1485
1486 public JExpressionIF forComplexSuperReference(ComplexSuperReference that) {
1487 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1488 return forComplexSuperReferenceOnly(that, enclosing_result);
1489 }
1490
1491 public JExpressionIF forSimpleMethodInvocation(SimpleMethodInvocation that) {
1492 final JExpressionIF name_result = that.getName().visit(this);
1493 final JExpressionIF arguments_result = that.getArguments().visit(this);
1494 return forSimpleMethodInvocationOnly(that, name_result, arguments_result);
1495 }
1496
1497 public JExpressionIF forComplexMethodInvocation(ComplexMethodInvocation that) {
1498 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1499 final JExpressionIF name_result = that.getName().visit(this);
1500 final JExpressionIF arguments_result = that.getArguments().visit(this);
1501 return forComplexMethodInvocationOnly(that, enclosing_result, name_result, arguments_result);
1502 }
1503
1504 public JExpressionIF forSimpleThisConstructorInvocation(SimpleThisConstructorInvocation that) {
1505 final JExpressionIF arguments_result = that.getArguments().visit(this);
1506 return forSimpleThisConstructorInvocationOnly(that, arguments_result);
1507 }
1508
1509 public JExpressionIF forComplexThisConstructorInvocation(ComplexThisConstructorInvocation that) {
1510 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1511 final JExpressionIF arguments_result = that.getArguments().visit(this);
1512 return forComplexThisConstructorInvocationOnly(that, enclosing_result, arguments_result);
1513 }
1514
1515 public JExpressionIF forSimpleSuperConstructorInvocation(SimpleSuperConstructorInvocation that) {
1516 final JExpressionIF arguments_result = that.getArguments().visit(this);
1517 return forSimpleSuperConstructorInvocationOnly(that, arguments_result);
1518 }
1519
1520 public JExpressionIF forComplexSuperConstructorInvocation(ComplexSuperConstructorInvocation that) {
1521 final JExpressionIF enclosing_result = that.getEnclosing().visit(this);
1522 final JExpressionIF arguments_result = that.getArguments().visit(this);
1523 return forComplexSuperConstructorInvocationOnly(that, enclosing_result, arguments_result);
1524 }
1525
1526 public JExpressionIF forClassLiteral(ClassLiteral that) {
1527 final JExpressionIF type_result = that.getType().visit(this);
1528 return forClassLiteralOnly(that, type_result);
1529 }
1530
1531 public JExpressionIF forArrayAccess(ArrayAccess that) {
1532 final JExpressionIF array_result = that.getArray().visit(this);
1533 final JExpressionIF index_result = that.getIndex().visit(this);
1534 return forArrayAccessOnly(that, array_result, index_result);
1535 }
1536
1537 public JExpressionIF forParenthesized(Parenthesized that) {
1538 final JExpressionIF value_result = that.getValue().visit(this);
1539 return forParenthesizedOnly(that, value_result);
1540 }
1541
1542 public JExpressionIF forEmptyExpression(EmptyExpression that) {
1543 return forEmptyExpressionOnly(that);
1544 }
1545
1546 public JExpressionIF forBracedBody(BracedBody that) {
1547 final JExpressionIF[] statements_result = new BodyItemI[that.getStatements().length];
1548 for (int i = 0; i < that.getStatements().length; i++) {
1549 statements_result[i] = (BodyItemI)that.getStatements()[i].visit(this);
1550 }
1551 return forBracedBodyOnly(that, statements_result);
1552 }
1553
1554 public JExpressionIF forUnbracedBody(UnbracedBody that) {
1555 final JExpressionIF[] statements_result = new BodyItemI[that.getStatements().length];
1556 for (int i = 0; i < that.getStatements().length; i++) {
1557 statements_result[i] = (BodyItemI)that.getStatements()[i].visit(this);
1558 }
1559 return forUnbracedBodyOnly(that, statements_result);
1560 }
1561
1562 public JExpressionIF forParenthesizedExpressionList(ParenthesizedExpressionList that) {
1563 final JExpressionIF[] expressions_result = new Expression[that.getExpressions().length];
1564 for (int i = 0; i < that.getExpressions().length; i++) {
1565 expressions_result[i] = (Expression)that.getExpressions()[i].visit(this);
1566 }
1567 return forParenthesizedExpressionListOnly(that, expressions_result);
1568 }
1569
1570 public JExpressionIF forUnparenthesizedExpressionList(UnparenthesizedExpressionList that) {
1571 final JExpressionIF[] expressions_result = new Expression[that.getExpressions().length];
1572 for (int i = 0; i < that.getExpressions().length; i++) {
1573 expressions_result[i] = (Expression)that.getExpressions()[i].visit(this);
1574 }
1575 return forUnparenthesizedExpressionListOnly(that, expressions_result);
1576 }
1577
1578 public JExpressionIF forDimensionExpressionList(DimensionExpressionList that) {
1579 final JExpressionIF[] expressions_result = new Expression[that.getExpressions().length];
1580 for (int i = 0; i < that.getExpressions().length; i++) {
1581 expressions_result[i] = (Expression)that.getExpressions()[i].visit(this);
1582 }
1583 return forDimensionExpressionListOnly(that, expressions_result);
1584 }
1585
1586 public JExpressionIF forEmptyForCondition(EmptyForCondition that) {
1587 return forEmptyForConditionOnly(that);
1588 }
1589
1590 }