001    package edu.rice.cs.javalanglevels.tree;
002    
003    /** A parametric abstract implementation of a visitor over JExpressionIF that return a value.
004     ** This visitor implements the visitor interface with methods that 
005     ** return the value of the defaultCase.  These methods can be overriden 
006     ** in order to achieve different behavior for particular cases.
007     **/
008    public abstract class JExpressionIFAbstractVisitor<RetType> implements JExpressionIFVisitor<RetType> {
009      /**
010       * This method is run for all cases by default, unless they are overridden by subclasses.
011      **/
012      protected abstract RetType defaultCase(JExpressionIF that);
013    
014      /* Methods to visit an item. */
015      public RetType forJExpression(JExpression that) {
016        return defaultCase(that);
017      }
018    
019      public RetType forSourceFile(SourceFile that) {
020        return forJExpression(that);
021      }
022    
023      public RetType forModifiersAndVisibility(ModifiersAndVisibility that) {
024        return forJExpression(that);
025      }
026    
027      public RetType forCompoundWord(CompoundWord that) {
028        return forJExpression(that);
029      }
030    
031      public RetType forWord(Word that) {
032        return forJExpression(that);
033      }
034    
035      public RetType forTypeDefBase(TypeDefBase that) {
036        return forJExpression(that);
037      }
038    
039      public RetType forClassDef(ClassDef that) {
040        return forTypeDefBase(that);
041      }
042    
043      public RetType forInnerClassDef(InnerClassDef that) {
044        return forClassDef(that);
045      }
046    
047      public RetType forInterfaceDef(InterfaceDef that) {
048        return forTypeDefBase(that);
049      }
050    
051      public RetType forInnerInterfaceDef(InnerInterfaceDef that) {
052        return forInterfaceDef(that);
053      }
054    
055      public RetType forConstructorDef(ConstructorDef that) {
056        return forJExpression(that);
057      }
058    
059      public RetType forInitializer(Initializer that) {
060        return forJExpression(that);
061      }
062    
063      public RetType forInstanceInitializer(InstanceInitializer that) {
064        return forInitializer(that);
065      }
066    
067      public RetType forStaticInitializer(StaticInitializer that) {
068        return forInitializer(that);
069      }
070    
071      public RetType forPackageStatement(PackageStatement that) {
072        return forJExpression(that);
073      }
074    
075      public RetType forImportStatement(ImportStatement that) {
076        return forJExpression(that);
077      }
078    
079      public RetType forClassImportStatement(ClassImportStatement that) {
080        return forImportStatement(that);
081      }
082    
083      public RetType forPackageImportStatement(PackageImportStatement that) {
084        return forImportStatement(that);
085      }
086    
087      public RetType forStatement(Statement that) {
088        return forJExpression(that);
089      }
090    
091      public RetType forLabeledStatement(LabeledStatement that) {
092        return forStatement(that);
093      }
094    
095      public RetType forBlock(Block that) {
096        return forStatement(that);
097      }
098    
099      public RetType forExpressionStatement(ExpressionStatement that) {
100        return forStatement(that);
101      }
102    
103      public RetType forSwitchStatement(SwitchStatement that) {
104        return forStatement(that);
105      }
106    
107      public RetType forIfThenStatement(IfThenStatement that) {
108        return forStatement(that);
109      }
110    
111      public RetType forIfThenElseStatement(IfThenElseStatement that) {
112        return forIfThenStatement(that);
113      }
114    
115      public RetType forWhileStatement(WhileStatement that) {
116        return forStatement(that);
117      }
118    
119      public RetType forDoStatement(DoStatement that) {
120        return forStatement(that);
121      }
122    
123      public RetType forForStatement(ForStatement that) {
124        return forStatement(that);
125      }
126    
127      public RetType forBreakStatement(BreakStatement that) {
128        return forStatement(that);
129      }
130    
131      public RetType forLabeledBreakStatement(LabeledBreakStatement that) {
132        return forBreakStatement(that);
133      }
134    
135      public RetType forUnlabeledBreakStatement(UnlabeledBreakStatement that) {
136        return forBreakStatement(that);
137      }
138    
139      public RetType forContinueStatement(ContinueStatement that) {
140        return forStatement(that);
141      }
142    
143      public RetType forLabeledContinueStatement(LabeledContinueStatement that) {
144        return forContinueStatement(that);
145      }
146    
147      public RetType forUnlabeledContinueStatement(UnlabeledContinueStatement that) {
148        return forContinueStatement(that);
149      }
150    
151      public RetType forReturnStatement(ReturnStatement that) {
152        return forStatement(that);
153      }
154    
155      public RetType forVoidReturnStatement(VoidReturnStatement that) {
156        return forReturnStatement(that);
157      }
158    
159      public RetType forValueReturnStatement(ValueReturnStatement that) {
160        return forReturnStatement(that);
161      }
162    
163      public RetType forThrowStatement(ThrowStatement that) {
164        return forStatement(that);
165      }
166    
167      public RetType forSynchronizedStatement(SynchronizedStatement that) {
168        return forStatement(that);
169      }
170    
171      public RetType forTryCatchStatement(TryCatchStatement that) {
172        return forStatement(that);
173      }
174    
175      public RetType forTryCatchFinallyStatement(TryCatchFinallyStatement that) {
176        return forTryCatchStatement(that);
177      }
178    
179      public RetType forNormalTryCatchStatement(NormalTryCatchStatement that) {
180        return forTryCatchStatement(that);
181      }
182    
183      public RetType forEmptyStatement(EmptyStatement that) {
184        return forStatement(that);
185      }
186    
187      public RetType forMethodDef(MethodDef that) {
188        return forJExpression(that);
189      }
190    
191      public RetType forConcreteMethodDef(ConcreteMethodDef that) {
192        return forMethodDef(that);
193      }
194    
195      public RetType forAbstractMethodDef(AbstractMethodDef that) {
196        return forMethodDef(that);
197      }
198    
199      public RetType forFormalParameter(FormalParameter that) {
200        return forJExpression(that);
201      }
202    
203      public RetType forVariableDeclaration(VariableDeclaration that) {
204        return forJExpression(that);
205      }
206    
207      public RetType forVariableDeclarator(VariableDeclarator that) {
208        return forJExpression(that);
209      }
210    
211      public RetType forUninitializedVariableDeclarator(UninitializedVariableDeclarator that) {
212        return forVariableDeclarator(that);
213      }
214    
215      public RetType forInitializedVariableDeclarator(InitializedVariableDeclarator that) {
216        return forVariableDeclarator(that);
217      }
218    
219      public RetType forTypeParameter(TypeParameter that) {
220        return forJExpression(that);
221      }
222    
223      public RetType forArrayInitializer(ArrayInitializer that) {
224        return forJExpression(that);
225      }
226    
227      public RetType forType(Type that) {
228        return forJExpression(that);
229      }
230    
231      public RetType forPrimitiveType(PrimitiveType that) {
232        return forType(that);
233      }
234    
235      public RetType forArrayType(ArrayType that) {
236        return forType(that);
237      }
238    
239      public RetType forReferenceType(ReferenceType that) {
240        return forType(that);
241      }
242    
243      public RetType forMemberType(MemberType that) {
244        return forReferenceType(that);
245      }
246    
247      public RetType forClassOrInterfaceType(ClassOrInterfaceType that) {
248        return forReferenceType(that);
249      }
250    
251      public RetType forTypeVariable(TypeVariable that) {
252        return forReferenceType(that);
253      }
254    
255      public RetType forVoidReturn(VoidReturn that) {
256        return forJExpression(that);
257      }
258    
259      public RetType forSwitchCase(SwitchCase that) {
260        return forJExpression(that);
261      }
262    
263      public RetType forLabeledCase(LabeledCase that) {
264        return forSwitchCase(that);
265      }
266    
267      public RetType forDefaultCase(DefaultCase that) {
268        return forSwitchCase(that);
269      }
270    
271      public RetType forCatchBlock(CatchBlock that) {
272        return forJExpression(that);
273      }
274    
275      public RetType forExpression(Expression that) {
276        return forJExpression(that);
277      }
278    
279      public RetType forAssignmentExpression(AssignmentExpression that) {
280        return forExpression(that);
281      }
282    
283      public RetType forSimpleAssignmentExpression(SimpleAssignmentExpression that) {
284        return forAssignmentExpression(that);
285      }
286    
287      public RetType forPlusAssignmentExpression(PlusAssignmentExpression that) {
288        return forAssignmentExpression(that);
289      }
290    
291      public RetType forNumericAssignmentExpression(NumericAssignmentExpression that) {
292        return forAssignmentExpression(that);
293      }
294    
295      public RetType forMinusAssignmentExpression(MinusAssignmentExpression that) {
296        return forNumericAssignmentExpression(that);
297      }
298    
299      public RetType forMultiplyAssignmentExpression(MultiplyAssignmentExpression that) {
300        return forNumericAssignmentExpression(that);
301      }
302    
303      public RetType forDivideAssignmentExpression(DivideAssignmentExpression that) {
304        return forNumericAssignmentExpression(that);
305      }
306    
307      public RetType forModAssignmentExpression(ModAssignmentExpression that) {
308        return forNumericAssignmentExpression(that);
309      }
310    
311      public RetType forShiftAssignmentExpression(ShiftAssignmentExpression that) {
312        return forAssignmentExpression(that);
313      }
314    
315      public RetType forLeftShiftAssignmentExpression(LeftShiftAssignmentExpression that) {
316        return forShiftAssignmentExpression(that);
317      }
318    
319      public RetType forRightSignedShiftAssignmentExpression(RightSignedShiftAssignmentExpression that) {
320        return forShiftAssignmentExpression(that);
321      }
322    
323      public RetType forRightUnsignedShiftAssignmentExpression(RightUnsignedShiftAssignmentExpression that) {
324        return forShiftAssignmentExpression(that);
325      }
326    
327      public RetType forBitwiseAssignmentExpression(BitwiseAssignmentExpression that) {
328        return forAssignmentExpression(that);
329      }
330    
331      public RetType forBitwiseAndAssignmentExpression(BitwiseAndAssignmentExpression that) {
332        return forBitwiseAssignmentExpression(that);
333      }
334    
335      public RetType forBitwiseOrAssignmentExpression(BitwiseOrAssignmentExpression that) {
336        return forBitwiseAssignmentExpression(that);
337      }
338    
339      public RetType forBitwiseXorAssignmentExpression(BitwiseXorAssignmentExpression that) {
340        return forBitwiseAssignmentExpression(that);
341      }
342    
343      public RetType forBinaryExpression(BinaryExpression that) {
344        return forExpression(that);
345      }
346    
347      public RetType forBooleanExpression(BooleanExpression that) {
348        return forBinaryExpression(that);
349      }
350    
351      public RetType forOrExpression(OrExpression that) {
352        return forBooleanExpression(that);
353      }
354    
355      public RetType forAndExpression(AndExpression that) {
356        return forBooleanExpression(that);
357      }
358    
359      public RetType forBitwiseBinaryExpression(BitwiseBinaryExpression that) {
360        return forBinaryExpression(that);
361      }
362    
363      public RetType forBitwiseOrExpression(BitwiseOrExpression that) {
364        return forBitwiseBinaryExpression(that);
365      }
366    
367      public RetType forBitwiseXorExpression(BitwiseXorExpression that) {
368        return forBitwiseBinaryExpression(that);
369      }
370    
371      public RetType forBitwiseAndExpression(BitwiseAndExpression that) {
372        return forBitwiseBinaryExpression(that);
373      }
374    
375      public RetType forEqualityExpression(EqualityExpression that) {
376        return forBinaryExpression(that);
377      }
378    
379      public RetType forEqualsExpression(EqualsExpression that) {
380        return forEqualityExpression(that);
381      }
382    
383      public RetType forNotEqualExpression(NotEqualExpression that) {
384        return forEqualityExpression(that);
385      }
386    
387      public RetType forComparisonExpression(ComparisonExpression that) {
388        return forBinaryExpression(that);
389      }
390    
391      public RetType forLessThanExpression(LessThanExpression that) {
392        return forComparisonExpression(that);
393      }
394    
395      public RetType forLessThanOrEqualExpression(LessThanOrEqualExpression that) {
396        return forComparisonExpression(that);
397      }
398    
399      public RetType forGreaterThanExpression(GreaterThanExpression that) {
400        return forComparisonExpression(that);
401      }
402    
403      public RetType forGreaterThanOrEqualExpression(GreaterThanOrEqualExpression that) {
404        return forComparisonExpression(that);
405      }
406    
407      public RetType forShiftBinaryExpression(ShiftBinaryExpression that) {
408        return forBinaryExpression(that);
409      }
410    
411      public RetType forLeftShiftExpression(LeftShiftExpression that) {
412        return forShiftBinaryExpression(that);
413      }
414    
415      public RetType forRightSignedShiftExpression(RightSignedShiftExpression that) {
416        return forShiftBinaryExpression(that);
417      }
418    
419      public RetType forRightUnsignedShiftExpression(RightUnsignedShiftExpression that) {
420        return forShiftBinaryExpression(that);
421      }
422    
423      public RetType forPlusExpression(PlusExpression that) {
424        return forBinaryExpression(that);
425      }
426    
427      public RetType forNumericBinaryExpression(NumericBinaryExpression that) {
428        return forBinaryExpression(that);
429      }
430    
431      public RetType forMinusExpression(MinusExpression that) {
432        return forNumericBinaryExpression(that);
433      }
434    
435      public RetType forMultiplyExpression(MultiplyExpression that) {
436        return forNumericBinaryExpression(that);
437      }
438    
439      public RetType forDivideExpression(DivideExpression that) {
440        return forNumericBinaryExpression(that);
441      }
442    
443      public RetType forModExpression(ModExpression that) {
444        return forNumericBinaryExpression(that);
445      }
446    
447      public RetType forNoOpExpression(NoOpExpression that) {
448        return forBinaryExpression(that);
449      }
450    
451      public RetType forUnaryExpression(UnaryExpression that) {
452        return forExpression(that);
453      }
454    
455      public RetType forIncrementExpression(IncrementExpression that) {
456        return forUnaryExpression(that);
457      }
458    
459      public RetType forPrefixIncrementExpression(PrefixIncrementExpression that) {
460        return forIncrementExpression(that);
461      }
462    
463      public RetType forPositivePrefixIncrementExpression(PositivePrefixIncrementExpression that) {
464        return forPrefixIncrementExpression(that);
465      }
466    
467      public RetType forNegativePrefixIncrementExpression(NegativePrefixIncrementExpression that) {
468        return forPrefixIncrementExpression(that);
469      }
470    
471      public RetType forPostfixIncrementExpression(PostfixIncrementExpression that) {
472        return forIncrementExpression(that);
473      }
474    
475      public RetType forPositivePostfixIncrementExpression(PositivePostfixIncrementExpression that) {
476        return forPostfixIncrementExpression(that);
477      }
478    
479      public RetType forNegativePostfixIncrementExpression(NegativePostfixIncrementExpression that) {
480        return forPostfixIncrementExpression(that);
481      }
482    
483      public RetType forNumericUnaryExpression(NumericUnaryExpression that) {
484        return forUnaryExpression(that);
485      }
486    
487      public RetType forPositiveExpression(PositiveExpression that) {
488        return forNumericUnaryExpression(that);
489      }
490    
491      public RetType forNegativeExpression(NegativeExpression that) {
492        return forNumericUnaryExpression(that);
493      }
494    
495      public RetType forBitwiseNotExpression(BitwiseNotExpression that) {
496        return forUnaryExpression(that);
497      }
498    
499      public RetType forNotExpression(NotExpression that) {
500        return forUnaryExpression(that);
501      }
502    
503      public RetType forConditionalExpression(ConditionalExpression that) {
504        return forExpression(that);
505      }
506    
507      public RetType forInstanceofExpression(InstanceofExpression that) {
508        return forExpression(that);
509      }
510    
511      public RetType forCastExpression(CastExpression that) {
512        return forExpression(that);
513      }
514    
515      public RetType forPrimary(Primary that) {
516        return forExpression(that);
517      }
518    
519      public RetType forLexicalLiteral(LexicalLiteral that) {
520        return forPrimary(that);
521      }
522    
523      public RetType forIntegerLiteral(IntegerLiteral that) {
524        return forLexicalLiteral(that);
525      }
526    
527      public RetType forLongLiteral(LongLiteral that) {
528        return forLexicalLiteral(that);
529      }
530    
531      public RetType forDoubleLiteral(DoubleLiteral that) {
532        return forLexicalLiteral(that);
533      }
534    
535      public RetType forFloatLiteral(FloatLiteral that) {
536        return forLexicalLiteral(that);
537      }
538    
539      public RetType forBooleanLiteral(BooleanLiteral that) {
540        return forLexicalLiteral(that);
541      }
542    
543      public RetType forCharLiteral(CharLiteral that) {
544        return forLexicalLiteral(that);
545      }
546    
547      public RetType forStringLiteral(StringLiteral that) {
548        return forLexicalLiteral(that);
549      }
550    
551      public RetType forNullLiteral(NullLiteral that) {
552        return forLexicalLiteral(that);
553      }
554    
555      public RetType forInstantiation(Instantiation that) {
556        return forPrimary(that);
557      }
558    
559      public RetType forClassInstantiation(ClassInstantiation that) {
560        return forInstantiation(that);
561      }
562    
563      public RetType forNamedClassInstantiation(NamedClassInstantiation that) {
564        return forClassInstantiation(that);
565      }
566    
567      public RetType forSimpleNamedClassInstantiation(SimpleNamedClassInstantiation that) {
568        return forNamedClassInstantiation(that);
569      }
570    
571      public RetType forComplexNamedClassInstantiation(ComplexNamedClassInstantiation that) {
572        return forNamedClassInstantiation(that);
573      }
574    
575      public RetType forAnonymousClassInstantiation(AnonymousClassInstantiation that) {
576        return forClassInstantiation(that);
577      }
578    
579      public RetType forSimpleAnonymousClassInstantiation(SimpleAnonymousClassInstantiation that) {
580        return forAnonymousClassInstantiation(that);
581      }
582    
583      public RetType forComplexAnonymousClassInstantiation(ComplexAnonymousClassInstantiation that) {
584        return forAnonymousClassInstantiation(that);
585      }
586    
587      public RetType forArrayInstantiation(ArrayInstantiation that) {
588        return forInstantiation(that);
589      }
590    
591      public RetType forUninitializedArrayInstantiation(UninitializedArrayInstantiation that) {
592        return forArrayInstantiation(that);
593      }
594    
595      public RetType forSimpleUninitializedArrayInstantiation(SimpleUninitializedArrayInstantiation that) {
596        return forUninitializedArrayInstantiation(that);
597      }
598    
599      public RetType forComplexUninitializedArrayInstantiation(ComplexUninitializedArrayInstantiation that) {
600        return forUninitializedArrayInstantiation(that);
601      }
602    
603      public RetType forInitializedArrayInstantiation(InitializedArrayInstantiation that) {
604        return forArrayInstantiation(that);
605      }
606    
607      public RetType forSimpleInitializedArrayInstantiation(SimpleInitializedArrayInstantiation that) {
608        return forInitializedArrayInstantiation(that);
609      }
610    
611      public RetType forComplexInitializedArrayInstantiation(ComplexInitializedArrayInstantiation that) {
612        return forInitializedArrayInstantiation(that);
613      }
614    
615      public RetType forVariableReference(VariableReference that) {
616        return forPrimary(that);
617      }
618    
619      public RetType forNameReference(NameReference that) {
620        return forVariableReference(that);
621      }
622    
623      public RetType forSimpleNameReference(SimpleNameReference that) {
624        return forNameReference(that);
625      }
626    
627      public RetType forComplexNameReference(ComplexNameReference that) {
628        return forNameReference(that);
629      }
630    
631      public RetType forThisReference(ThisReference that) {
632        return forVariableReference(that);
633      }
634    
635      public RetType forSimpleThisReference(SimpleThisReference that) {
636        return forThisReference(that);
637      }
638    
639      public RetType forComplexThisReference(ComplexThisReference that) {
640        return forThisReference(that);
641      }
642    
643      public RetType forSuperReference(SuperReference that) {
644        return forVariableReference(that);
645      }
646    
647      public RetType forSimpleSuperReference(SimpleSuperReference that) {
648        return forSuperReference(that);
649      }
650    
651      public RetType forComplexSuperReference(ComplexSuperReference that) {
652        return forSuperReference(that);
653      }
654    
655      public RetType forFunctionInvocation(FunctionInvocation that) {
656        return forPrimary(that);
657      }
658    
659      public RetType forMethodInvocation(MethodInvocation that) {
660        return forFunctionInvocation(that);
661      }
662    
663      public RetType forSimpleMethodInvocation(SimpleMethodInvocation that) {
664        return forMethodInvocation(that);
665      }
666    
667      public RetType forComplexMethodInvocation(ComplexMethodInvocation that) {
668        return forMethodInvocation(that);
669      }
670    
671      public RetType forThisConstructorInvocation(ThisConstructorInvocation that) {
672        return forFunctionInvocation(that);
673      }
674    
675      public RetType forSimpleThisConstructorInvocation(SimpleThisConstructorInvocation that) {
676        return forThisConstructorInvocation(that);
677      }
678    
679      public RetType forComplexThisConstructorInvocation(ComplexThisConstructorInvocation that) {
680        return forThisConstructorInvocation(that);
681      }
682    
683      public RetType forSuperConstructorInvocation(SuperConstructorInvocation that) {
684        return forFunctionInvocation(that);
685      }
686    
687      public RetType forSimpleSuperConstructorInvocation(SimpleSuperConstructorInvocation that) {
688        return forSuperConstructorInvocation(that);
689      }
690    
691      public RetType forComplexSuperConstructorInvocation(ComplexSuperConstructorInvocation that) {
692        return forSuperConstructorInvocation(that);
693      }
694    
695      public RetType forClassLiteral(ClassLiteral that) {
696        return forPrimary(that);
697      }
698    
699      public RetType forArrayAccess(ArrayAccess that) {
700        return forPrimary(that);
701      }
702    
703      public RetType forParenthesized(Parenthesized that) {
704        return forPrimary(that);
705      }
706    
707      public RetType forEmptyExpression(EmptyExpression that) {
708        return forPrimary(that);
709      }
710    
711      public RetType forBody(Body that) {
712        return forJExpression(that);
713      }
714    
715      public RetType forBracedBody(BracedBody that) {
716        return forBody(that);
717      }
718    
719      public RetType forUnbracedBody(UnbracedBody that) {
720        return forBody(that);
721      }
722    
723      public RetType forExpressionList(ExpressionList that) {
724        return forJExpression(that);
725      }
726    
727      public RetType forParenthesizedExpressionList(ParenthesizedExpressionList that) {
728        return forExpressionList(that);
729      }
730    
731      public RetType forUnparenthesizedExpressionList(UnparenthesizedExpressionList that) {
732        return forExpressionList(that);
733      }
734    
735      public RetType forDimensionExpressionList(DimensionExpressionList that) {
736        return forExpressionList(that);
737      }
738    
739      public RetType forEmptyForCondition(EmptyForCondition that) {
740        return forJExpression(that);
741      }
742    
743    
744    }