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 */ 017package org.apache.bcel.generic; 018 019/** 020 * Interface implementing the Visitor pattern programming style. I.e., a class that implements this interface can handle 021 * all types of instructions with the properly typed methods just by calling the accept() method. 022 */ 023public interface Visitor { 024 025 void visitAALOAD(AALOAD obj); 026 027 void visitAASTORE(AASTORE obj); 028 029 void visitACONST_NULL(ACONST_NULL obj); 030 031 void visitAllocationInstruction(AllocationInstruction obj); 032 033 void visitALOAD(ALOAD obj); 034 035 void visitANEWARRAY(ANEWARRAY obj); 036 037 void visitARETURN(ARETURN obj); 038 039 void visitArithmeticInstruction(ArithmeticInstruction obj); 040 041 void visitArrayInstruction(ArrayInstruction obj); 042 043 void visitARRAYLENGTH(ARRAYLENGTH obj); 044 045 void visitASTORE(ASTORE obj); 046 047 void visitATHROW(ATHROW obj); 048 049 void visitBALOAD(BALOAD obj); 050 051 void visitBASTORE(BASTORE obj); 052 053 void visitBIPUSH(BIPUSH obj); 054 055 void visitBranchInstruction(BranchInstruction obj); 056 057 void visitBREAKPOINT(BREAKPOINT obj); 058 059 void visitCALOAD(CALOAD obj); 060 061 void visitCASTORE(CASTORE obj); 062 063 void visitCHECKCAST(CHECKCAST obj); 064 065 void visitConstantPushInstruction(ConstantPushInstruction obj); 066 067 void visitConversionInstruction(ConversionInstruction obj); 068 069 void visitCPInstruction(CPInstruction obj); 070 071 void visitD2F(D2F obj); 072 073 void visitD2I(D2I obj); 074 075 void visitD2L(D2L obj); 076 077 void visitDADD(DADD obj); 078 079 void visitDALOAD(DALOAD obj); 080 081 void visitDASTORE(DASTORE obj); 082 083 void visitDCMPG(DCMPG obj); 084 085 void visitDCMPL(DCMPL obj); 086 087 void visitDCONST(DCONST obj); 088 089 void visitDDIV(DDIV obj); 090 091 void visitDLOAD(DLOAD obj); 092 093 void visitDMUL(DMUL obj); 094 095 void visitDNEG(DNEG obj); 096 097 void visitDREM(DREM obj); 098 099 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}