    001/*
    002 * Licensed to the Apache Software Foundation (ASF) under one
    003 * or more contributor license agreements.  See the NOTICE file
    004 * distributed with this work for additional information
    005 * regarding copyright ownership.  The ASF licenses this file
    006 * to you under the Apache License, Version 2.0 (the
    007 * "License"); you may not use this file except in compliance
    008 * with the License.  You may obtain a copy of the License at
    009 *
    010 *   https://www.apache.org/licenses/LICENSE-2.0
    011 *
    012 * Unless required by applicable law or agreed to in writing,
    013 * software distributed under the License is distributed on an
    014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
    015 * KIND, either express or implied.  See the License for the
    016 * specific language governing permissions and limitations
    017 * under the License.
    018 */
    019package org.apache.bcel.generic;
    020
    021/**
    022 * Interface implementing the Visitor pattern programming style. I.e., a class that implements this interface can handle
    023 * all types of instructions with the properly typed methods just by calling the accept() method.
    024 */
    025public interface Visitor {
    026
    027    void visitAALOAD(AALOAD obj);
    028
    029    void visitAASTORE(AASTORE obj);
    030
    031    void visitACONST_NULL(ACONST_NULL obj);
    032
    033    void visitAllocationInstruction(AllocationInstruction obj);
    034
    035    void visitALOAD(ALOAD obj);
    036
    037    void visitANEWARRAY(ANEWARRAY obj);
    038
    039    void visitARETURN(ARETURN obj);
    040
    041    void visitArithmeticInstruction(ArithmeticInstruction obj);
    042
    043    void visitArrayInstruction(ArrayInstruction obj);
    044
    045    void visitARRAYLENGTH(ARRAYLENGTH obj);
    046
    047    void visitASTORE(ASTORE obj);
    048
    049    void visitATHROW(ATHROW obj);
    050
    051    void visitBALOAD(BALOAD obj);
    052
    053    void visitBASTORE(BASTORE obj);
    054
    055    void visitBIPUSH(BIPUSH obj);
    056
    057    void visitBranchInstruction(BranchInstruction obj);
    058
    059    void visitBREAKPOINT(BREAKPOINT obj);
    060
    061    void visitCALOAD(CALOAD obj);
    062
    063    void visitCASTORE(CASTORE obj);
    064
    065    void visitCHECKCAST(CHECKCAST obj);
    066
    067    void visitConstantPushInstruction(ConstantPushInstruction obj);
    068
    069    void visitConversionInstruction(ConversionInstruction obj);
    070
    071    void visitCPInstruction(CPInstruction obj);
    072
    073    void visitD2F(D2F obj);
    074
    075    void visitD2I(D2I obj);
    076
    077    void visitD2L(D2L obj);
    078
    079    void visitDADD(DADD obj);
    080
    081    void visitDALOAD(DALOAD obj);
    082
    083    void visitDASTORE(DASTORE obj);
    084
    085    void visitDCMPG(DCMPG obj);
    086
    087    void visitDCMPL(DCMPL obj);
    088
    089    void visitDCONST(DCONST obj);
    090
    091    void visitDDIV(DDIV obj);
    092
    093    void visitDLOAD(DLOAD obj);
    094
    095    void visitDMUL(DMUL obj);
    096
    097    void visitDNEG(DNEG obj);
    098
    099    void visitDREM(DREM obj);
    100
    101    void visitDRETURN(DRETURN obj);
    102
    103    void visitDSTORE(DSTORE obj);
    104
    105    void visitDSUB(DSUB obj);
    106
    107    void visitDUP(DUP obj);
    108
    109    void visitDUP_X1(DUP_X1 obj);
    110
    111    void visitDUP_X2(DUP_X2 obj);
    112
    113    void visitDUP2(DUP2 obj);
    114
    115    void visitDUP2_X1(DUP2_X1 obj);
    116
    117    void visitDUP2_X2(DUP2_X2 obj);
    118
    119    void visitExceptionThrower(ExceptionThrower obj);
    120
    121    void visitF2D(F2D obj);
    122
    123    void visitF2I(F2I obj);
    124
    125    void visitF2L(F2L obj);
    126
    127    void visitFADD(FADD obj);
    128
    129    void visitFALOAD(FALOAD obj);
    130
    131    void visitFASTORE(FASTORE obj);
    132
    133    void visitFCMPG(FCMPG obj);
    134
    135    void visitFCMPL(FCMPL obj);
    136
    137    void visitFCONST(FCONST obj);
    138
    139    void visitFDIV(FDIV obj);
    140
    141    void visitFieldInstruction(FieldInstruction obj);
    142
    143    void visitFieldOrMethod(FieldOrMethod obj);
    144
    145    void visitFLOAD(FLOAD obj);
    146
    147    void visitFMUL(FMUL obj);
    148
    149    void visitFNEG(FNEG obj);
    150
    151    void visitFREM(FREM obj);
    152
    153    void visitFRETURN(FRETURN obj);
    154
    155    void visitFSTORE(FSTORE obj);
    156
    157    void visitFSUB(FSUB obj);
    158
    159    void visitGETFIELD(GETFIELD obj);
    160
    161    void visitGETSTATIC(GETSTATIC obj);
    162
    163    void visitGOTO(GOTO obj);
    164
    165    void visitGOTO_W(GOTO_W obj);
    166
    167    void visitGotoInstruction(GotoInstruction obj);
    168
    169    void visitI2B(I2B obj);
    170
    171    void visitI2C(I2C obj);
    172
    173    void visitI2D(I2D obj);
    174
    175    void visitI2F(I2F obj);
    176
    177    void visitI2L(I2L obj);
    178
    179    void visitI2S(I2S obj);
    180
    181    void visitIADD(IADD obj);
    182
    183    void visitIALOAD(IALOAD obj);
    184
    185    void visitIAND(IAND obj);
    186
    187    void visitIASTORE(IASTORE obj);
    188
    189    void visitICONST(ICONST obj);
    190
    191    void visitIDIV(IDIV obj);
    192
    193    void visitIF_ACMPEQ(IF_ACMPEQ obj);
    194
    195    void visitIF_ACMPNE(IF_ACMPNE obj);
    196
    197    void visitIF_ICMPEQ(IF_ICMPEQ obj);
    198
    199    void visitIF_ICMPGE(IF_ICMPGE obj);
    200
    201    void visitIF_ICMPGT(IF_ICMPGT obj);
    202
    203    void visitIF_ICMPLE(IF_ICMPLE obj);
    204
    205    void visitIF_ICMPLT(IF_ICMPLT obj);
    206
    207    void visitIF_ICMPNE(IF_ICMPNE obj);
    208
    209    void visitIFEQ(IFEQ obj);
    210
    211    void visitIFGE(IFGE obj);
    212
    213    void visitIFGT(IFGT obj);
    214
    215    void visitIfInstruction(IfInstruction obj);
    216
    217    void visitIFLE(IFLE obj);
    218
    219    void visitIFLT(IFLT obj);
    220
    221    void visitIFNE(IFNE obj);
    222
    223    void visitIFNONNULL(IFNONNULL obj);
    224
    225    void visitIFNULL(IFNULL obj);
    226
    227    void visitIINC(IINC obj);
    228
    229    void visitILOAD(ILOAD obj);
    230
    231    void visitIMPDEP1(IMPDEP1 obj);
    232
    233    void visitIMPDEP2(IMPDEP2 obj);
    234
    235    void visitIMUL(IMUL obj);
    236
    237    void visitINEG(INEG obj);
    238
    239    void visitINSTANCEOF(INSTANCEOF obj);
    240
    241    /**
    242     * @since 6.0
    243     */
    244    void visitINVOKEDYNAMIC(INVOKEDYNAMIC obj);
    245
    246    void visitInvokeInstruction(InvokeInstruction obj);
    247
    248    void visitINVOKEINTERFACE(INVOKEINTERFACE obj);
    249
    250    void visitINVOKESPECIAL(INVOKESPECIAL obj);
    251
    252    void visitINVOKESTATIC(INVOKESTATIC obj);
    253
    254    void visitINVOKEVIRTUAL(INVOKEVIRTUAL obj);
    255
    256    void visitIOR(IOR obj);
    257
    258    void visitIREM(IREM obj);
    259
    260    void visitIRETURN(IRETURN obj);
    261
    262    void visitISHL(ISHL obj);
    263
    264    void visitISHR(ISHR obj);
    265
    266    void visitISTORE(ISTORE obj);
    267
    268    void visitISUB(ISUB obj);
    269
    270    void visitIUSHR(IUSHR obj);
    271
    272    void visitIXOR(IXOR obj);
    273
    274    void visitJSR(JSR obj);
    275
    276    void visitJSR_W(JSR_W obj);
    277
    278    void visitJsrInstruction(JsrInstruction obj);
    279
    280    void visitL2D(L2D obj);
    281
    282    void visitL2F(L2F obj);
    283
    284    void visitL2I(L2I obj);
    285
    286    void visitLADD(LADD obj);
    287
    288    void visitLALOAD(LALOAD obj);
    289
    290    void visitLAND(LAND obj);
    291
    292    void visitLASTORE(LASTORE obj);
    293
    294    void visitLCMP(LCMP obj);
    295
    296    void visitLCONST(LCONST obj);
    297
    298    void visitLDC(LDC obj);
    299
    300    void visitLDC2_W(LDC2_W obj);
    301
    302    void visitLDIV(LDIV obj);
    303
    304    void visitLLOAD(LLOAD obj);
    305
    306    void visitLMUL(LMUL obj);
    307
    308    void visitLNEG(LNEG obj);
    309
    310    void visitLoadClass(LoadClass obj);
    311
    312    void visitLoadInstruction(LoadInstruction obj);
    313
    314    void visitLocalVariableInstruction(LocalVariableInstruction obj);
    315
    316    void visitLOOKUPSWITCH(LOOKUPSWITCH obj);
    317
    318    void visitLOR(LOR obj);
    319
    320    void visitLREM(LREM obj);
    321
    322    void visitLRETURN(LRETURN obj);
    323
    324    void visitLSHL(LSHL obj);
    325
    326    void visitLSHR(LSHR obj);
    327
    328    void visitLSTORE(LSTORE obj);
    329
    330    void visitLSUB(LSUB obj);
    331
    332    void visitLUSHR(LUSHR obj);
    333
    334    void visitLXOR(LXOR obj);
    335
    336    void visitMONITORENTER(MONITORENTER obj);
    337
    338    void visitMONITOREXIT(MONITOREXIT obj);
    339
    340    void visitMULTIANEWARRAY(MULTIANEWARRAY obj);
    341
    342    void visitNEW(NEW obj);
    343
    344    void visitNEWARRAY(NEWARRAY obj);
    345
    346    void visitNOP(NOP obj);
    347
    348    void visitPOP(POP obj);
    349
    350    void visitPOP2(POP2 obj);
    351
    352    void visitPopInstruction(PopInstruction obj);
    353
    354    void visitPushInstruction(PushInstruction obj);
    355
    356    void visitPUTFIELD(PUTFIELD obj);
    357
    358    void visitPUTSTATIC(PUTSTATIC obj);
    359
    360    void visitRET(RET obj);
    361
    362    void visitRETURN(RETURN obj);
    363
    364    void visitReturnInstruction(ReturnInstruction obj);
    365
    366    void visitSALOAD(SALOAD obj);
    367
    368    void visitSASTORE(SASTORE obj);
    369
    370    void visitSelect(Select obj);
    371
    372    void visitSIPUSH(SIPUSH obj);
    373
    374    void visitStackConsumer(StackConsumer obj);
    375
    376    void visitStackInstruction(StackInstruction obj);
    377
    378    void visitStackProducer(StackProducer obj);
    379
    380    void visitStoreInstruction(StoreInstruction obj);
    381
    382    void visitSWAP(SWAP obj);
    383
    384    void visitTABLESWITCH(TABLESWITCH obj);
    385
    386    void visitTypedInstruction(TypedInstruction obj);
    387
    388    void visitUnconditionalBranch(UnconditionalBranch obj);
    389
    390    void visitVariableLengthInstruction(VariableLengthInstruction obj);
    391}