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