View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *      http://www.apache.org/licenses/LICENSE-2.0
10   *
11   *  Unless required by applicable law or agreed to in writing, software
12   *  distributed under the License is distributed on an "AS IS" BASIS,
13   *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   *  See the License for the specific language governing permissions and
15   *  limitations under the License.
16   */
17  package org.apache.bcel.generic;
18  
19  /**
20   * Interface implementing the Visitor pattern programming style. I.e., a class that implements this interface can handle
21   * all types of instructions with the properly typed methods just by calling the accept() method.
22   */
23  public interface Visitor {
24  
25      void visitAALOAD(AALOAD obj);
26  
27      void visitAASTORE(AASTORE obj);
28  
29      void visitACONST_NULL(ACONST_NULL obj);
30  
31      void visitAllocationInstruction(AllocationInstruction obj);
32  
33      void visitALOAD(ALOAD obj);
34  
35      void visitANEWARRAY(ANEWARRAY obj);
36  
37      void visitARETURN(ARETURN obj);
38  
39      void visitArithmeticInstruction(ArithmeticInstruction obj);
40  
41      void visitArrayInstruction(ArrayInstruction obj);
42  
43      void visitARRAYLENGTH(ARRAYLENGTH obj);
44  
45      void visitASTORE(ASTORE obj);
46  
47      void visitATHROW(ATHROW obj);
48  
49      void visitBALOAD(BALOAD obj);
50  
51      void visitBASTORE(BASTORE obj);
52  
53      void visitBIPUSH(BIPUSH obj);
54  
55      void visitBranchInstruction(BranchInstruction obj);
56  
57      void visitBREAKPOINT(BREAKPOINT obj);
58  
59      void visitCALOAD(CALOAD obj);
60  
61      void visitCASTORE(CASTORE obj);
62  
63      void visitCHECKCAST(CHECKCAST obj);
64  
65      void visitConstantPushInstruction(ConstantPushInstruction obj);
66  
67      void visitConversionInstruction(ConversionInstruction obj);
68  
69      void visitCPInstruction(CPInstruction obj);
70  
71      void visitD2F(D2F obj);
72  
73      void visitD2I(D2I obj);
74  
75      void visitD2L(D2L obj);
76  
77      void visitDADD(DADD obj);
78  
79      void visitDALOAD(DALOAD obj);
80  
81      void visitDASTORE(DASTORE obj);
82  
83      void visitDCMPG(DCMPG obj);
84  
85      void visitDCMPL(DCMPL obj);
86  
87      void visitDCONST(DCONST obj);
88  
89      void visitDDIV(DDIV obj);
90  
91      void visitDLOAD(DLOAD obj);
92  
93      void visitDMUL(DMUL obj);
94  
95      void visitDNEG(DNEG obj);
96  
97      void visitDREM(DREM obj);
98  
99      void visitDRETURN(DRETURN obj);
100 
101     void visitDSTORE(DSTORE obj);
102 
103     void visitDSUB(DSUB obj);
104 
105     void visitDUP(DUP obj);
106 
107     void visitDUP_X1(DUP_X1 obj);
108 
109     void visitDUP_X2(DUP_X2 obj);
110 
111     void visitDUP2(DUP2 obj);
112 
113     void visitDUP2_X1(DUP2_X1 obj);
114 
115     void visitDUP2_X2(DUP2_X2 obj);
116 
117     void visitExceptionThrower(ExceptionThrower obj);
118 
119     void visitF2D(F2D obj);
120 
121     void visitF2I(F2I obj);
122 
123     void visitF2L(F2L obj);
124 
125     void visitFADD(FADD obj);
126 
127     void visitFALOAD(FALOAD obj);
128 
129     void visitFASTORE(FASTORE obj);
130 
131     void visitFCMPG(FCMPG obj);
132 
133     void visitFCMPL(FCMPL obj);
134 
135     void visitFCONST(FCONST obj);
136 
137     void visitFDIV(FDIV obj);
138 
139     void visitFieldInstruction(FieldInstruction obj);
140 
141     void visitFieldOrMethod(FieldOrMethod obj);
142 
143     void visitFLOAD(FLOAD obj);
144 
145     void visitFMUL(FMUL obj);
146 
147     void visitFNEG(FNEG obj);
148 
149     void visitFREM(FREM obj);
150 
151     void visitFRETURN(FRETURN obj);
152 
153     void visitFSTORE(FSTORE obj);
154 
155     void visitFSUB(FSUB obj);
156 
157     void visitGETFIELD(GETFIELD obj);
158 
159     void visitGETSTATIC(GETSTATIC obj);
160 
161     void visitGOTO(GOTO obj);
162 
163     void visitGOTO_W(GOTO_W obj);
164 
165     void visitGotoInstruction(GotoInstruction obj);
166 
167     void visitI2B(I2B obj);
168 
169     void visitI2C(I2C obj);
170 
171     void visitI2D(I2D obj);
172 
173     void visitI2F(I2F obj);
174 
175     void visitI2L(I2L obj);
176 
177     void visitI2S(I2S obj);
178 
179     void visitIADD(IADD obj);
180 
181     void visitIALOAD(IALOAD obj);
182 
183     void visitIAND(IAND obj);
184 
185     void visitIASTORE(IASTORE obj);
186 
187     void visitICONST(ICONST obj);
188 
189     void visitIDIV(IDIV obj);
190 
191     void visitIF_ACMPEQ(IF_ACMPEQ obj);
192 
193     void visitIF_ACMPNE(IF_ACMPNE obj);
194 
195     void visitIF_ICMPEQ(IF_ICMPEQ obj);
196 
197     void visitIF_ICMPGE(IF_ICMPGE obj);
198 
199     void visitIF_ICMPGT(IF_ICMPGT obj);
200 
201     void visitIF_ICMPLE(IF_ICMPLE obj);
202 
203     void visitIF_ICMPLT(IF_ICMPLT obj);
204 
205     void visitIF_ICMPNE(IF_ICMPNE obj);
206 
207     void visitIFEQ(IFEQ obj);
208 
209     void visitIFGE(IFGE obj);
210 
211     void visitIFGT(IFGT obj);
212 
213     void visitIfInstruction(IfInstruction obj);
214 
215     void visitIFLE(IFLE obj);
216 
217     void visitIFLT(IFLT obj);
218 
219     void visitIFNE(IFNE obj);
220 
221     void visitIFNONNULL(IFNONNULL obj);
222 
223     void visitIFNULL(IFNULL obj);
224 
225     void visitIINC(IINC obj);
226 
227     void visitILOAD(ILOAD obj);
228 
229     void visitIMPDEP1(IMPDEP1 obj);
230 
231     void visitIMPDEP2(IMPDEP2 obj);
232 
233     void visitIMUL(IMUL obj);
234 
235     void visitINEG(INEG obj);
236 
237     void visitINSTANCEOF(INSTANCEOF obj);
238 
239     /**
240      * @since 6.0
241      */
242     void visitINVOKEDYNAMIC(INVOKEDYNAMIC obj);
243 
244     void visitInvokeInstruction(InvokeInstruction obj);
245 
246     void visitINVOKEINTERFACE(INVOKEINTERFACE obj);
247 
248     void visitINVOKESPECIAL(INVOKESPECIAL obj);
249 
250     void visitINVOKESTATIC(INVOKESTATIC obj);
251 
252     void visitINVOKEVIRTUAL(INVOKEVIRTUAL obj);
253 
254     void visitIOR(IOR obj);
255 
256     void visitIREM(IREM obj);
257 
258     void visitIRETURN(IRETURN obj);
259 
260     void visitISHL(ISHL obj);
261 
262     void visitISHR(ISHR obj);
263 
264     void visitISTORE(ISTORE obj);
265 
266     void visitISUB(ISUB obj);
267 
268     void visitIUSHR(IUSHR obj);
269 
270     void visitIXOR(IXOR obj);
271 
272     void visitJSR(JSR obj);
273 
274     void visitJSR_W(JSR_W obj);
275 
276     void visitJsrInstruction(JsrInstruction obj);
277 
278     void visitL2D(L2D obj);
279 
280     void visitL2F(L2F obj);
281 
282     void visitL2I(L2I obj);
283 
284     void visitLADD(LADD obj);
285 
286     void visitLALOAD(LALOAD obj);
287 
288     void visitLAND(LAND obj);
289 
290     void visitLASTORE(LASTORE obj);
291 
292     void visitLCMP(LCMP obj);
293 
294     void visitLCONST(LCONST obj);
295 
296     void visitLDC(LDC obj);
297 
298     void visitLDC2_W(LDC2_W obj);
299 
300     void visitLDIV(LDIV obj);
301 
302     void visitLLOAD(LLOAD obj);
303 
304     void visitLMUL(LMUL obj);
305 
306     void visitLNEG(LNEG obj);
307 
308     void visitLoadClass(LoadClass obj);
309 
310     void visitLoadInstruction(LoadInstruction obj);
311 
312     void visitLocalVariableInstruction(LocalVariableInstruction obj);
313 
314     void visitLOOKUPSWITCH(LOOKUPSWITCH obj);
315 
316     void visitLOR(LOR obj);
317 
318     void visitLREM(LREM obj);
319 
320     void visitLRETURN(LRETURN obj);
321 
322     void visitLSHL(LSHL obj);
323 
324     void visitLSHR(LSHR obj);
325 
326     void visitLSTORE(LSTORE obj);
327 
328     void visitLSUB(LSUB obj);
329 
330     void visitLUSHR(LUSHR obj);
331 
332     void visitLXOR(LXOR obj);
333 
334     void visitMONITORENTER(MONITORENTER obj);
335 
336     void visitMONITOREXIT(MONITOREXIT obj);
337 
338     void visitMULTIANEWARRAY(MULTIANEWARRAY obj);
339 
340     void visitNEW(NEW obj);
341 
342     void visitNEWARRAY(NEWARRAY obj);
343 
344     void visitNOP(NOP obj);
345 
346     void visitPOP(POP obj);
347 
348     void visitPOP2(POP2 obj);
349 
350     void visitPopInstruction(PopInstruction obj);
351 
352     void visitPushInstruction(PushInstruction obj);
353 
354     void visitPUTFIELD(PUTFIELD obj);
355 
356     void visitPUTSTATIC(PUTSTATIC obj);
357 
358     void visitRET(RET obj);
359 
360     void visitRETURN(RETURN obj);
361 
362     void visitReturnInstruction(ReturnInstruction obj);
363 
364     void visitSALOAD(SALOAD obj);
365 
366     void visitSASTORE(SASTORE obj);
367 
368     void visitSelect(Select obj);
369 
370     void visitSIPUSH(SIPUSH obj);
371 
372     void visitStackConsumer(StackConsumer obj);
373 
374     void visitStackInstruction(StackInstruction obj);
375 
376     void visitStackProducer(StackProducer obj);
377 
378     void visitStoreInstruction(StoreInstruction obj);
379 
380     void visitSWAP(SWAP obj);
381 
382     void visitTABLESWITCH(TABLESWITCH obj);
383 
384     void visitTypedInstruction(TypedInstruction obj);
385 
386     void visitUnconditionalBranch(UnconditionalBranch obj);
387 
388     void visitVariableLengthInstruction(VariableLengthInstruction obj);
389 }