1/*
2 * ProGuard -- shrinking, optimization, obfuscation, and preverification
3 *             of Java bytecode.
4 *
5 * Copyright (c) 2002-2013 Eric Lafortune (eric@graphics.cornell.edu)
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the Free
9 * Software Foundation; either version 2 of the License, or (at your option)
10 * any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15 * more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program; if not, write to the Free Software Foundation, Inc.,
19 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 */
21package proguard.classfile.util;
22
23import proguard.classfile.*;
24import proguard.classfile.attribute.*;
25import proguard.classfile.attribute.annotation.*;
26import proguard.classfile.attribute.preverification.*;
27import proguard.classfile.constant.*;
28import proguard.classfile.instruction.*;
29
30/**
31 * This abstract utility class allows to implement various visitor interfaces
32 * with simplified methods. The provided methods delegate to other versions
33 * with fewer arguments or more general arguments.
34 *
35 * @author Eric Lafortune
36 * @noinspection AbstractClassWithoutAbstractMethods
37 */
38public abstract class SimplifiedVisitor
39{
40    // Simplifications for ClassVisitor.
41
42    /**
43     * Visits any type of class member of the given class.
44     */
45    public void visitAnyClass(Clazz clazz)
46    {
47        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
48    }
49
50
51    public void visitProgramClass(ProgramClass programClass)
52    {
53        visitAnyClass(programClass);
54    }
55
56
57    public void visitLibraryClass(LibraryClass libraryClass)
58    {
59        visitAnyClass(libraryClass);
60    }
61
62
63    // Simplifications for MemberVisitor.
64
65    /**
66     * Visits any type of class member of the given class.
67     */
68    public void visitAnyMember(Clazz clazz, Member member)
69    {
70        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
71    }
72
73
74    /**
75     * Visits any type of class member of the given program class.
76     */
77    public void visitProgramMember(ProgramClass programClass, ProgramMember programMember)
78    {
79        visitAnyMember(programClass, programMember);
80    }
81
82
83    public void visitProgramField(ProgramClass programClass, ProgramField programField)
84    {
85        visitProgramMember(programClass, programField);
86    }
87
88
89    public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
90    {
91        visitProgramMember(programClass, programMethod);
92    }
93
94
95    /**
96     * Visits any type of class member of the given library class.
97     */
98    public void visitLibraryMember(LibraryClass libraryClass, LibraryMember libraryMember)
99    {
100        visitAnyMember(libraryClass, libraryMember);
101    }
102
103
104    public void visitLibraryField(LibraryClass libraryClass, LibraryField libraryField)
105    {
106        visitLibraryMember(libraryClass, libraryField);
107    }
108
109
110    public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
111    {
112        visitLibraryMember(libraryClass, libraryMethod);
113    }
114
115
116    // Simplifications for ConstantVisitor.
117
118    public void visitAnyConstant(Clazz clazz, Constant constant)
119    {
120        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
121    }
122
123
124    public void visitIntegerConstant(Clazz clazz, IntegerConstant integerConstant)
125    {
126        visitAnyConstant(clazz, integerConstant);
127    }
128
129
130    public void visitLongConstant(Clazz clazz, LongConstant longConstant)
131    {
132        visitAnyConstant(clazz, longConstant);
133    }
134
135
136    public void visitFloatConstant(Clazz clazz, FloatConstant floatConstant)
137    {
138        visitAnyConstant(clazz, floatConstant);
139    }
140
141
142    public void visitDoubleConstant(Clazz clazz, DoubleConstant doubleConstant)
143    {
144        visitAnyConstant(clazz, doubleConstant);
145    }
146
147
148    public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
149    {
150        visitAnyConstant(clazz, stringConstant);
151    }
152
153
154    public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant)
155    {
156        visitAnyConstant(clazz, utf8Constant);
157    }
158
159
160    public void visitInvokeDynamicConstant(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant)
161    {
162        visitAnyConstant(clazz, invokeDynamicConstant);
163    }
164
165
166    public void visitMethodHandleConstant(Clazz clazz, MethodHandleConstant methodHandleConstant)
167    {
168        visitAnyConstant(clazz, methodHandleConstant);
169    }
170
171
172    /**
173     * Visits any type of RefConstant of the given class.
174     */
175    public void visitAnyRefConstant(Clazz clazz, RefConstant refConstant)
176    {
177        visitAnyConstant(clazz, refConstant);
178    }
179
180
181    public void visitFieldrefConstant(Clazz clazz, FieldrefConstant fieldrefConstant)
182    {
183        visitAnyRefConstant(clazz, fieldrefConstant);
184    }
185
186
187    /**
188     * Visits any type of method RefConstant of the given class.
189     */
190    public void visitAnyMethodrefConstant(Clazz clazz, RefConstant refConstant)
191    {
192        visitAnyRefConstant(clazz, refConstant);
193    }
194
195
196    public void visitInterfaceMethodrefConstant(Clazz clazz, InterfaceMethodrefConstant interfaceMethodrefConstant)
197    {
198        visitAnyMethodrefConstant(clazz, interfaceMethodrefConstant);
199    }
200
201
202    public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant)
203    {
204        visitAnyMethodrefConstant(clazz, methodrefConstant);
205    }
206
207
208    public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
209    {
210        visitAnyConstant(clazz, classConstant);
211    }
212
213
214    public void visitMethodTypeConstant(Clazz clazz, MethodTypeConstant methodTypeConstant)
215    {
216        visitAnyConstant(clazz, methodTypeConstant);
217    }
218
219
220    public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant)
221    {
222        visitAnyConstant(clazz, nameAndTypeConstant);
223    }
224
225
226    // Simplifications for AttributeVisitor.
227
228    /**
229     * Visit any type of attribute.
230     */
231    public void visitAnyAttribute(Clazz clazz, Attribute attribute)
232    {
233        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
234    }
235
236
237    public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute)
238    {
239        visitAnyAttribute(clazz, unknownAttribute);
240    }
241
242
243    public void visitBootstrapMethodsAttribute(Clazz clazz, BootstrapMethodsAttribute bootstrapMethodsAttribute)
244    {
245        visitAnyAttribute(clazz, bootstrapMethodsAttribute);
246    }
247
248
249    public void visitSourceFileAttribute(Clazz clazz, SourceFileAttribute sourceFileAttribute)
250    {
251        visitAnyAttribute(clazz, sourceFileAttribute);
252    }
253
254
255    public void visitSourceDirAttribute(Clazz clazz, SourceDirAttribute sourceDirAttribute)
256    {
257        visitAnyAttribute(clazz, sourceDirAttribute);
258    }
259
260
261    public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute)
262    {
263        visitAnyAttribute(clazz, innerClassesAttribute);
264    }
265
266
267    public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute)
268    {
269        visitAnyAttribute(clazz, enclosingMethodAttribute);
270    }
271
272
273    public void visitDeprecatedAttribute(Clazz clazz, DeprecatedAttribute deprecatedAttribute)
274    {
275        visitAnyAttribute(clazz, deprecatedAttribute);
276    }
277
278
279    /**
280     * Visits the given DeprecatedAttribute of any type of class member.
281     */
282    public void visitDeprecatedAttribute(Clazz clazz, Member member, DeprecatedAttribute deprecatedAttribute)
283    {
284        visitDeprecatedAttribute(clazz, deprecatedAttribute);
285    }
286
287
288    public void visitDeprecatedAttribute(Clazz clazz, Field field, DeprecatedAttribute deprecatedAttribute)
289    {
290        visitDeprecatedAttribute(clazz, (Member)field, deprecatedAttribute);
291    }
292
293
294    public void visitDeprecatedAttribute(Clazz clazz, Method method, DeprecatedAttribute deprecatedAttribute)
295    {
296        visitDeprecatedAttribute(clazz, (Member)method, deprecatedAttribute);
297    }
298
299
300    public void visitSyntheticAttribute(Clazz clazz, SyntheticAttribute syntheticAttribute)
301    {
302        visitAnyAttribute(clazz, syntheticAttribute);
303    }
304
305
306    /**
307     * Visits the given SyntheticAttribute of any type of class member.
308     */
309    public void visitSyntheticAttribute(Clazz clazz, Member member, SyntheticAttribute syntheticAttribute)
310    {
311        visitSyntheticAttribute(clazz, syntheticAttribute);
312    }
313
314
315    public void visitSyntheticAttribute(Clazz clazz, Field field, SyntheticAttribute syntheticAttribute)
316    {
317        visitSyntheticAttribute(clazz, (Member)field, syntheticAttribute);
318    }
319
320
321    public void visitSyntheticAttribute(Clazz clazz, Method method, SyntheticAttribute syntheticAttribute)
322    {
323        visitSyntheticAttribute(clazz, (Member)method, syntheticAttribute);
324    }
325
326
327    public void visitSignatureAttribute(Clazz clazz, SignatureAttribute signatureAttribute)
328    {
329        visitAnyAttribute(clazz, signatureAttribute);
330    }
331
332
333    /**
334     * Visits the given SignatureAttribute of any type of class member.
335     */
336    public void visitSignatureAttribute(Clazz clazz, Member member, SignatureAttribute signatureAttribute)
337    {
338        visitSignatureAttribute(clazz, signatureAttribute);
339    }
340
341
342    public void visitSignatureAttribute(Clazz clazz, Field field, SignatureAttribute signatureAttribute)
343    {
344        visitSignatureAttribute(clazz, (Member)field, signatureAttribute);
345    }
346
347
348    public void visitSignatureAttribute(Clazz clazz, Method method, SignatureAttribute signatureAttribute)
349    {
350        visitSignatureAttribute(clazz, (Member)method, signatureAttribute);
351    }
352
353
354    public void visitConstantValueAttribute(Clazz clazz, Field field, ConstantValueAttribute constantValueAttribute)
355    {
356        visitAnyAttribute(clazz, constantValueAttribute);
357    }
358
359
360    public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
361    {
362        visitAnyAttribute(clazz, exceptionsAttribute);
363    }
364
365
366    public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
367    {
368        visitAnyAttribute(clazz, codeAttribute);
369    }
370
371
372    public void visitStackMapAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapAttribute stackMapAttribute)
373    {
374        visitAnyAttribute(clazz, stackMapAttribute);
375    }
376
377
378    public void visitStackMapTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapTableAttribute stackMapTableAttribute)
379    {
380        visitAnyAttribute(clazz, stackMapTableAttribute);
381    }
382
383
384    public void visitLineNumberTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberTableAttribute lineNumberTableAttribute)
385    {
386        visitAnyAttribute(clazz, lineNumberTableAttribute);
387    }
388
389
390    public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute)
391    {
392        visitAnyAttribute(clazz, localVariableTableAttribute);
393    }
394
395
396    public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute)
397    {
398        visitAnyAttribute(clazz, localVariableTypeTableAttribute);
399    }
400
401
402    /**
403     * Visits any type of AnnotationsAttribute of a class.
404     */
405    public void visitAnyAnnotationsAttribute(Clazz clazz, AnnotationsAttribute annotationsAttribute)
406    {
407        visitAnyAttribute(clazz, annotationsAttribute);
408    }
409
410
411    public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
412    {
413        visitAnyAnnotationsAttribute(clazz, runtimeVisibleAnnotationsAttribute);
414    }
415
416
417    /**
418     * Visits the given RuntimeVisibleAnnotationsAttribute of any type of class member.
419     */
420    public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Member member, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
421    {
422        visitRuntimeVisibleAnnotationsAttribute(clazz, runtimeVisibleAnnotationsAttribute);
423    }
424
425
426    public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Field field, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
427    {
428        visitRuntimeVisibleAnnotationsAttribute(clazz, (Member)field, runtimeVisibleAnnotationsAttribute);
429    }
430
431
432    public void visitRuntimeVisibleAnnotationsAttribute(Clazz clazz, Method method, RuntimeVisibleAnnotationsAttribute runtimeVisibleAnnotationsAttribute)
433    {
434        visitRuntimeVisibleAnnotationsAttribute(clazz, (Member)method, runtimeVisibleAnnotationsAttribute);
435    }
436
437
438    public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
439    {
440        visitAnyAnnotationsAttribute(clazz, runtimeInvisibleAnnotationsAttribute);
441    }
442
443
444    /**
445     * Visits the given RuntimeInvisibleAnnotationsAttribute of any type of class member.
446     */
447    public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, Member member, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
448    {
449        visitRuntimeInvisibleAnnotationsAttribute(clazz, runtimeInvisibleAnnotationsAttribute);
450    }
451
452
453    public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, Field field, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
454    {
455        visitRuntimeInvisibleAnnotationsAttribute(clazz, (Member)field, runtimeInvisibleAnnotationsAttribute);
456    }
457
458
459    public void visitRuntimeInvisibleAnnotationsAttribute(Clazz clazz, Method method, RuntimeInvisibleAnnotationsAttribute runtimeInvisibleAnnotationsAttribute)
460    {
461        visitRuntimeInvisibleAnnotationsAttribute(clazz, (Member)method, runtimeInvisibleAnnotationsAttribute);
462    }
463
464
465    /**
466     * Visits any type of ParameterAnnotationsAttribute.
467     */
468    public void visitAnyParameterAnnotationsAttribute(Clazz clazz, Method method, ParameterAnnotationsAttribute parameterAnnotationsAttribute)
469    {
470        visitAnyAttribute(clazz, parameterAnnotationsAttribute);
471    }
472
473
474    public void visitRuntimeVisibleParameterAnnotationsAttribute(Clazz clazz, Method method, RuntimeVisibleParameterAnnotationsAttribute runtimeVisibleParameterAnnotationsAttribute)
475    {
476        visitAnyParameterAnnotationsAttribute(clazz, method, runtimeVisibleParameterAnnotationsAttribute);
477    }
478
479
480    public void visitRuntimeInvisibleParameterAnnotationsAttribute(Clazz clazz, Method method, RuntimeInvisibleParameterAnnotationsAttribute runtimeInvisibleParameterAnnotationsAttribute)
481    {
482        visitAnyParameterAnnotationsAttribute(clazz, method, runtimeInvisibleParameterAnnotationsAttribute);
483    }
484
485
486    public void visitAnnotationDefaultAttribute(Clazz clazz, Method method, AnnotationDefaultAttribute annotationDefaultAttribute)
487    {
488        visitAnyAttribute(clazz, annotationDefaultAttribute);
489    }
490
491
492    // Simplifications for InstructionVisitor.
493
494    /**
495     * Visits any type of Instruction.
496     */
497    public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
498    {
499        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
500    }
501
502
503    public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
504    {
505        visitAnyInstruction(clazz, method, codeAttribute, offset, simpleInstruction);
506    }
507
508
509    public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)
510    {
511        visitAnyInstruction(clazz, method, codeAttribute, offset, variableInstruction);
512    }
513
514
515    public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
516    {
517        visitAnyInstruction(clazz, method, codeAttribute, offset, constantInstruction);
518    }
519
520
521    public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction)
522    {
523        visitAnyInstruction(clazz, method, codeAttribute, offset, branchInstruction);
524    }
525
526
527    /**
528     * Visits either type of SwitchInstruction.
529     */
530    public void visitAnySwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SwitchInstruction switchInstruction)
531    {
532        visitAnyInstruction(clazz, method, codeAttribute, offset, switchInstruction);
533    }
534
535
536    public void visitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction)
537    {
538        visitAnySwitchInstruction(clazz, method, codeAttribute, offset, tableSwitchInstruction);
539    }
540
541
542    public void visitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction)
543    {
544        visitAnySwitchInstruction(clazz, method, codeAttribute, offset, lookUpSwitchInstruction);
545    }
546
547
548    // Simplifications for StackMapFrameVisitor.
549
550    /**
551     * Visits any type of VerificationType.
552     */
553    public void visitAnyStackMapFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, StackMapFrame stackMapFrame)
554    {
555        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
556    }
557
558
559    public void visitSameZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameZeroFrame sameZeroFrame)
560    {
561        visitAnyStackMapFrame(clazz, method, codeAttribute, offset, sameZeroFrame);
562    }
563
564
565    public void visitSameOneFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameOneFrame sameOneFrame)
566    {
567        visitAnyStackMapFrame(clazz, method, codeAttribute, offset, sameOneFrame);
568    }
569
570
571    public void visitLessZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LessZeroFrame lessZeroFrame)
572    {
573        visitAnyStackMapFrame(clazz, method, codeAttribute, offset, lessZeroFrame);
574    }
575
576
577    public void visitMoreZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, MoreZeroFrame moreZeroFrame)
578    {
579        visitAnyStackMapFrame(clazz, method, codeAttribute, offset, moreZeroFrame);
580    }
581
582
583    public void visitFullFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FullFrame fullFrame)
584    {
585        visitAnyStackMapFrame(clazz, method, codeAttribute, offset, fullFrame);
586    }
587
588
589    // Simplifications for VerificationTypeVisitor.
590
591    /**
592     * Visits any type of VerificationType.
593     */
594    public void visitAnyVerificationType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VerificationType verificationType)
595    {
596        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
597    }
598
599
600    public void visitIntegerType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, IntegerType integerType)
601    {
602        visitAnyVerificationType(clazz, method, codeAttribute, offset, integerType);
603    }
604
605
606    public void visitFloatType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FloatType floatType)
607    {
608        visitAnyVerificationType(clazz, method, codeAttribute, offset, floatType);
609    }
610
611
612    public void visitLongType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LongType longType)
613    {
614        visitAnyVerificationType(clazz, method, codeAttribute, offset, longType);
615    }
616
617
618    public void visitDoubleType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, DoubleType doubleType)
619    {
620        visitAnyVerificationType(clazz, method, codeAttribute, offset, doubleType);
621    }
622
623
624    public void visitTopType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TopType topType)
625    {
626        visitAnyVerificationType(clazz, method, codeAttribute, offset, topType);
627    }
628
629
630    public void visitObjectType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ObjectType objectType)
631    {
632        visitAnyVerificationType(clazz, method, codeAttribute, offset, objectType);
633    }
634
635
636    public void visitNullType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, NullType nullType)
637    {
638        visitAnyVerificationType(clazz, method, codeAttribute, offset, nullType);
639    }
640
641
642    public void visitUninitializedType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, UninitializedType uninitializedType)
643    {
644        visitAnyVerificationType(clazz, method, codeAttribute, offset, uninitializedType);
645    }
646
647
648    public void visitUninitializedThisType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, UninitializedThisType uninitializedThisType)
649    {
650        visitAnyVerificationType(clazz, method, codeAttribute, offset, uninitializedThisType);
651    }
652
653
654    public void visitStackIntegerType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, IntegerType integerType)
655    {
656        visitIntegerType(clazz, method, codeAttribute, offset, integerType);
657    }
658
659
660    public void visitStackFloatType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, FloatType floatType)
661    {
662        visitFloatType(clazz, method, codeAttribute, offset, floatType);
663    }
664
665
666    public void visitStackLongType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, LongType longType)
667    {
668        visitLongType(clazz, method, codeAttribute, offset, longType);
669    }
670
671
672    public void visitStackDoubleType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, DoubleType doubleType)
673    {
674        visitDoubleType(clazz, method, codeAttribute, offset, doubleType);
675    }
676
677
678    public void visitStackTopType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, TopType topType)
679    {
680        visitTopType(clazz, method, codeAttribute, offset, topType);
681    }
682
683
684    public void visitStackObjectType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, ObjectType objectType)
685    {
686        visitObjectType(clazz, method, codeAttribute, offset, objectType);
687    }
688
689
690    public void visitStackNullType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, NullType nullType)
691    {
692        visitNullType(clazz, method, codeAttribute, offset, nullType);
693    }
694
695
696    public void visitStackUninitializedType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, UninitializedType uninitializedType)
697    {
698        visitUninitializedType(clazz, method, codeAttribute, offset, uninitializedType);
699    }
700
701
702    public void visitStackUninitializedThisType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, UninitializedThisType uninitializedThisType)
703    {
704        visitUninitializedThisType(clazz, method, codeAttribute, offset, uninitializedThisType);
705    }
706
707
708
709    public void visitVariablesIntegerType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, IntegerType integerType)
710    {
711        visitIntegerType(clazz, method, codeAttribute, offset, integerType);
712    }
713
714
715    public void visitVariablesFloatType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, FloatType floatType)
716    {
717        visitFloatType(clazz, method, codeAttribute, offset, floatType);
718    }
719
720
721    public void visitVariablesLongType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, LongType longType)
722    {
723        visitLongType(clazz, method, codeAttribute, offset, longType);
724    }
725
726
727    public void visitVariablesDoubleType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, DoubleType doubleType)
728    {
729        visitDoubleType(clazz, method, codeAttribute, offset, doubleType);
730    }
731
732
733    public void visitVariablesTopType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, TopType topType)
734    {
735        visitTopType(clazz, method, codeAttribute, offset, topType);
736    }
737
738
739    public void visitVariablesObjectType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, ObjectType objectType)
740    {
741        visitObjectType(clazz, method, codeAttribute, offset, objectType);
742    }
743
744
745    public void visitVariablesNullType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, NullType nullType)
746    {
747        visitNullType(clazz, method, codeAttribute, offset, nullType);
748    }
749
750
751    public void visitVariablesUninitializedType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, UninitializedType uninitializedType)
752    {
753        visitUninitializedType(clazz, method, codeAttribute, offset, uninitializedType);
754    }
755
756
757    public void visitVariablesUninitializedThisType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, int index, UninitializedThisType uninitializedThisType)
758    {
759        visitUninitializedThisType(clazz, method, codeAttribute, offset, uninitializedThisType);
760    }
761
762
763    // Simplifications for AnnotationVisitor.
764
765    public void visitAnnotation(Clazz clazz, Annotation annotation)
766    {
767        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
768    }
769
770
771    /**
772     * Visits the given Annotation of any type of class member.
773     */
774    public void visitAnnotation(Clazz clazz, Member member, Annotation annotation)
775    {
776        visitAnnotation(clazz, annotation);
777    }
778
779
780    public void visitAnnotation(Clazz clazz, Field field, Annotation annotation)
781    {
782        visitAnnotation(clazz, (Member)field, annotation);
783    }
784
785
786    public void visitAnnotation(Clazz clazz, Method method, Annotation annotation)
787    {
788        visitAnnotation(clazz, (Member)method, annotation);
789    }
790
791
792    public void visitAnnotation(Clazz clazz, Method method, int parameterIndex, Annotation annotation)
793    {
794        visitAnnotation(clazz, method, annotation);
795    }
796
797
798    // Simplifications for ElementValueVisitor.
799
800    public void visitAnyElementValue(Clazz clazz, Annotation annotation, ElementValue elementValue)
801    {
802        throw new UnsupportedOperationException("Method must be overridden in ["+this.getClass().getName()+"] if ever called");
803    }
804
805
806    public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
807    {
808        visitAnyElementValue(clazz, annotation, constantElementValue);
809    }
810
811
812    public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue)
813    {
814        visitAnyElementValue(clazz, annotation, enumConstantElementValue);
815    }
816
817
818    public void visitClassElementValue(Clazz clazz, Annotation annotation, ClassElementValue classElementValue)
819    {
820        visitAnyElementValue(clazz, annotation, classElementValue);
821    }
822
823
824    public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue)
825    {
826        visitAnyElementValue(clazz, annotation, annotationElementValue);
827    }
828
829
830    public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
831    {
832        visitAnyElementValue(clazz, annotation, arrayElementValue);
833    }
834}
835