Interface InstructionVisitor
- All Known Implementing Classes:
CodeArray, InstructionAdapter, StackOpt, Tree
public interface InstructionVisitor
The visitor pattern allows functionality to be added to a number of classes
(or in this case one class, Instruction, that can vary in
behavior) without modifying the classes themselves. Additionally, the visitor
pattern simulates double dispatching. For instance visit method of
Instruction calls a particular method of
InstructionVisitor based on the Instruction's opcode.
InstructionVisitor provides an interface for performing actions based on the instruction type. Classes implementing this interface should not be able to miss any of the instruction types. This interface was created as an alternative to having 138 different subtypes of Instruction.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidvisit_aaload(Instruction inst) voidvisit_aastore(Instruction inst) voidvisit_aload(Instruction inst) voidvisit_areturn(Instruction inst) voidvisit_arraylength(Instruction inst) voidvisit_astore(Instruction inst) voidvisit_aswizzle(Instruction inst) voidvisit_aswrange(Instruction inst) voidvisit_athrow(Instruction inst) voidvisit_aupdate(Instruction inst) voidvisit_baload(Instruction inst) voidvisit_bastore(Instruction inst) voidvisit_caload(Instruction inst) voidvisit_castore(Instruction inst) voidvisit_checkcast(Instruction inst) voidvisit_d2f(Instruction inst) voidvisit_d2i(Instruction inst) voidvisit_d2l(Instruction inst) voidvisit_dadd(Instruction inst) voidvisit_daload(Instruction inst) voidvisit_dastore(Instruction inst) voidvisit_dcmpg(Instruction inst) voidvisit_dcmpl(Instruction inst) voidvisit_ddiv(Instruction inst) voidvisit_dload(Instruction inst) voidvisit_dmul(Instruction inst) voidvisit_dneg(Instruction inst) voidvisit_drem(Instruction inst) voidvisit_dreturn(Instruction inst) voidvisit_dstore(Instruction inst) voidvisit_dsub(Instruction inst) voidvisit_dup(Instruction inst) voidvisit_dup_x1(Instruction inst) voidvisit_dup_x2(Instruction inst) voidvisit_dup2(Instruction inst) voidvisit_dup2_x1(Instruction inst) voidvisit_dup2_x2(Instruction inst) voidvisit_f2d(Instruction inst) voidvisit_f2i(Instruction inst) voidvisit_f2l(Instruction inst) voidvisit_fadd(Instruction inst) voidvisit_faload(Instruction inst) voidvisit_fastore(Instruction inst) voidvisit_fcmpg(Instruction inst) voidvisit_fcmpl(Instruction inst) voidvisit_fdiv(Instruction inst) voidvisit_fload(Instruction inst) voidvisit_fmul(Instruction inst) voidvisit_fneg(Instruction inst) voidvisit_frem(Instruction inst) voidvisit_freturn(Instruction inst) voidvisit_fstore(Instruction inst) voidvisit_fsub(Instruction inst) voidvisit_getfield(Instruction inst) voidvisit_getstatic(Instruction inst) voidvisit_goto(Instruction inst) voidvisit_i2b(Instruction inst) voidvisit_i2c(Instruction inst) voidvisit_i2d(Instruction inst) voidvisit_i2f(Instruction inst) voidvisit_i2l(Instruction inst) voidvisit_i2s(Instruction inst) voidvisit_iadd(Instruction inst) voidvisit_iaload(Instruction inst) voidvisit_iand(Instruction inst) voidvisit_iastore(Instruction inst) voidvisit_idiv(Instruction inst) voidvisit_if_acmpeq(Instruction inst) voidvisit_if_acmpne(Instruction inst) voidvisit_if_icmpeq(Instruction inst) voidvisit_if_icmpge(Instruction inst) voidvisit_if_icmpgt(Instruction inst) voidvisit_if_icmple(Instruction inst) voidvisit_if_icmplt(Instruction inst) voidvisit_if_icmpne(Instruction inst) voidvisit_ifeq(Instruction inst) voidvisit_ifge(Instruction inst) voidvisit_ifgt(Instruction inst) voidvisit_ifle(Instruction inst) voidvisit_iflt(Instruction inst) voidvisit_ifne(Instruction inst) voidvisit_ifnonnull(Instruction inst) voidvisit_ifnull(Instruction inst) voidvisit_iinc(Instruction inst) voidvisit_iload(Instruction inst) voidvisit_imul(Instruction inst) voidvisit_ineg(Instruction inst) voidvisit_instanceof(Instruction inst) voidvoidvoidvoidvoidvisit_ior(Instruction inst) voidvisit_irem(Instruction inst) voidvisit_ireturn(Instruction inst) voidvisit_ishl(Instruction inst) voidvisit_ishr(Instruction inst) voidvisit_istore(Instruction inst) voidvisit_isub(Instruction inst) voidvisit_iushr(Instruction inst) voidvisit_ixor(Instruction inst) voidvisit_jsr(Instruction inst) voidvisit_l2d(Instruction inst) voidvisit_l2f(Instruction inst) voidvisit_l2i(Instruction inst) voidvisit_ladd(Instruction inst) voidvisit_laload(Instruction inst) voidvisit_land(Instruction inst) voidvisit_lastore(Instruction inst) voidvisit_lcmp(Instruction inst) voidvisit_ldc(Instruction inst) voidvisit_ldiv(Instruction inst) voidvisit_lload(Instruction inst) voidvisit_lmul(Instruction inst) voidvisit_lneg(Instruction inst) voidvisit_lor(Instruction inst) voidvisit_lrem(Instruction inst) voidvisit_lreturn(Instruction inst) voidvisit_lshl(Instruction inst) voidvisit_lshr(Instruction inst) voidvisit_lstore(Instruction inst) voidvisit_lsub(Instruction inst) voidvisit_lushr(Instruction inst) voidvisit_lxor(Instruction inst) voidvoidvisit_monitorexit(Instruction inst) voidvoidvisit_new(Instruction inst) voidvisit_newarray(Instruction inst) voidvisit_nop(Instruction inst) voidvisit_pop(Instruction inst) voidvisit_pop2(Instruction inst) voidvisit_putfield(Instruction inst) voidvoidvisit_putstatic(Instruction inst) voidvoidvisit_rc(Instruction inst) voidvisit_ret(Instruction inst) voidvisit_return(Instruction inst) voidvisit_saload(Instruction inst) voidvisit_sastore(Instruction inst) voidvisit_supdate(Instruction inst) voidvisit_swap(Instruction inst) voidvisit_switch(Instruction inst)
-
Method Details
-
visit_nop
-
visit_ldc
-
visit_iload
-
visit_lload
-
visit_fload
-
visit_dload
-
visit_aload
-
visit_iaload
-
visit_laload
-
visit_faload
-
visit_daload
-
visit_aaload
-
visit_baload
-
visit_caload
-
visit_saload
-
visit_istore
-
visit_lstore
-
visit_fstore
-
visit_dstore
-
visit_astore
-
visit_iastore
-
visit_lastore
-
visit_fastore
-
visit_dastore
-
visit_aastore
-
visit_bastore
-
visit_castore
-
visit_sastore
-
visit_pop
-
visit_pop2
-
visit_dup
-
visit_dup_x1
-
visit_dup_x2
-
visit_dup2
-
visit_dup2_x1
-
visit_dup2_x2
-
visit_swap
-
visit_iadd
-
visit_ladd
-
visit_fadd
-
visit_dadd
-
visit_isub
-
visit_lsub
-
visit_fsub
-
visit_dsub
-
visit_imul
-
visit_lmul
-
visit_fmul
-
visit_dmul
-
visit_idiv
-
visit_ldiv
-
visit_fdiv
-
visit_ddiv
-
visit_irem
-
visit_lrem
-
visit_frem
-
visit_drem
-
visit_ineg
-
visit_lneg
-
visit_fneg
-
visit_dneg
-
visit_ishl
-
visit_lshl
-
visit_ishr
-
visit_lshr
-
visit_iushr
-
visit_lushr
-
visit_iand
-
visit_land
-
visit_ior
-
visit_lor
-
visit_ixor
-
visit_lxor
-
visit_iinc
-
visit_i2l
-
visit_i2f
-
visit_i2d
-
visit_l2i
-
visit_l2f
-
visit_l2d
-
visit_f2i
-
visit_f2l
-
visit_f2d
-
visit_d2i
-
visit_d2l
-
visit_d2f
-
visit_i2b
-
visit_i2c
-
visit_i2s
-
visit_lcmp
-
visit_fcmpl
-
visit_fcmpg
-
visit_dcmpl
-
visit_dcmpg
-
visit_ifeq
-
visit_ifne
-
visit_iflt
-
visit_ifge
-
visit_ifgt
-
visit_ifle
-
visit_if_icmpeq
-
visit_if_icmpne
-
visit_if_icmplt
-
visit_if_icmpge
-
visit_if_icmpgt
-
visit_if_icmple
-
visit_if_acmpeq
-
visit_if_acmpne
-
visit_goto
-
visit_jsr
-
visit_ret
-
visit_switch
-
visit_ireturn
-
visit_lreturn
-
visit_freturn
-
visit_dreturn
-
visit_areturn
-
visit_return
-
visit_getstatic
-
visit_putstatic
-
visit_putstatic_nowb
-
visit_getfield
-
visit_putfield
-
visit_putfield_nowb
-
visit_invokevirtual
-
visit_invokespecial
-
visit_invokestatic
-
visit_invokeinterface
-
visit_new
-
visit_newarray
-
visit_arraylength
-
visit_athrow
-
visit_checkcast
-
visit_instanceof
-
visit_monitorenter
-
visit_monitorexit
-
visit_multianewarray
-
visit_ifnull
-
visit_ifnonnull
-
visit_rc
-
visit_aupdate
-
visit_supdate
-
visit_aswizzle
-
visit_aswrange
-