Class AbstractBytecodeVisitor

  • All Implemented Interfaces:
    Visitor<MethodEntry>

    public abstract class AbstractBytecodeVisitor
    extends Object
    implements Visitor<MethodEntry>
    Base visitor over a method's decoded instructions whose per-instruction visit hooks are all no-ops.
    • Constructor Detail

      • AbstractBytecodeVisitor

        public AbstractBytecodeVisitor()
    • Method Detail

      • process

        public void process​(MethodEntry method)
                     throws IOException
        Processes the given method by visiting its bytecode instructions.
        Specified by:
        process in interface Visitor<MethodEntry>
        Parameters:
        method - the method entry to process
        Throws:
        IOException - if an I/O error occurs during processing
      • visit

        public void visit​(NopInstruction instr)
        Visits a nop instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(AConstNullInstruction instr)
        Visits an aconst_null instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IConstInstruction instr)
        Visits an iconst instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LConstInstruction instr)
        Visits an lconst instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(FConstInstruction instr)
        Visits an fconst instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(DConstInstruction instr)
        Visits a dconst instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(BipushInstruction instr)
        Visits a bipush instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(SipushInstruction instr)
        Visits a sipush instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LdcInstruction instr)
        Visits an ldc instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LdcWInstruction instr)
        Visits an ldc_w instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(Ldc2WInstruction instr)
        Visits an ldc2_w instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ILoadInstruction instr)
        Visits an iload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LLoadInstruction instr)
        Visits an lload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(FLoadInstruction instr)
        Visits an fload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(DLoadInstruction instr)
        Visits a dload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ALoadInstruction instr)
        Visits an aload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IStoreInstruction instr)
        Visits an istore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LStoreInstruction instr)
        Visits an lstore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(FStoreInstruction instr)
        Visits an fstore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(DStoreInstruction instr)
        Visits a dstore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(AStoreInstruction instr)
        Visits an astore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(PopInstruction instr)
        Visits a pop instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(Pop2Instruction instr)
        Visits a pop2 instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(DupInstruction instr)
        Visits a dup-family stack duplication instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(SwapInstruction instr)
        Visits a swap instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ArithmeticInstruction instr)
        Visits an arithmetic instruction (add/sub/mul/div/rem).
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(INegInstruction instr)
        Visits an ineg instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LNegInstruction instr)
        Visits an lneg instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(FNegInstruction instr)
        Visits an fneg instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(DNegInstruction instr)
        Visits a dneg instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ArithmeticShiftInstruction instr)
        Visits a shift instruction (ishl/ishr/iushr and long forms).
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IAndInstruction instr)
        Visits an iand instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IOrInstruction instr)
        Visits an ior instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IXorInstruction instr)
        Visits an ixor instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IIncInstruction instr)
        Visits an iinc instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ConversionInstruction instr)
        Visits a primitive conversion instruction (i2f, l2d, ...).
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(NarrowingConversionInstruction instr)
        Visits a narrowing conversion instruction (i2b/i2c/i2s).
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(CompareInstruction instr)
        Visits a compare instruction (lcmp/fcmpl/fcmpg/dcmpl/dcmpg).
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ConditionalBranchInstruction instr)
        Visits a conditional branch instruction (if_*).
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(GotoInstruction instr)
        Visits a goto or goto_w instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(JsrInstruction instr)
        Visits a jsr instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(RetInstruction instr)
        Visits a ret instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(InvokeVirtualInstruction instr)
        Visits an invokevirtual instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(InvokeSpecialInstruction instr)
        Visits an invokespecial instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(InvokeStaticInstruction instr)
        Visits an invokestatic instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(InvokeInterfaceInstruction instr)
        Visits an invokeinterface instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(InvokeDynamicInstruction instr)
        Visits an invokedynamic instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(GetFieldInstruction instr)
        Visits a getfield or getstatic instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(PutFieldInstruction instr)
        Visits a putfield or putstatic instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(NewObjectInstruction instr)
        Visits a new instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(NewPrimitiveArrayInstruction instr)
        Visits a newarray instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ANewArrayInstruction instr)
        Visits an anewarray instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ArrayLengthInstruction instr)
        Visits an arraylength instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(ATHROWInstruction instr)
        Visits an athrow instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(CheckCastInstruction instr)
        Visits a checkcast instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(MultiANewArrayInstruction instr)
        Visits a multianewarray instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LookupSwitchInstruction instr)
        Visits a lookupswitch instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(TableSwitchInstruction instr)
        Visits a tableswitch instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(WideInstruction instr)
        Visits a wide-prefixed instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(MethodReturnInstruction instr)
        Visits a return instruction (ireturn/lreturn/freturn/dreturn/areturn/return).
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(UnknownInstruction instr)
        Visits an unrecognized or truncated instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(AALoadInstruction instr)
        Visits an aaload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(AAStoreInstruction instr)
        Visits an aastore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(BALOADInstruction instr)
        Visits a baload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(BAStoreInstruction instr)
        Visits a bastore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(CALoadInstruction instr)
        Visits a caload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(CAStoreInstruction instr)
        Visits a castore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(SALoadInstruction instr)
        Visits a saload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(DALoadInstruction instr)
        Visits a daload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(DAStoreInstruction instr)
        Visits a dastore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(FALoadInstruction instr)
        Visits an faload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(FAStoreInstruction instr)
        Visits an fastore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IALoadInstruction instr)
        Visits an iaload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(I2LInstruction instr)
        Visits an i2l instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(IAStoreInstruction instr)
        Visits an iastore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(InstanceOfInstruction instr)
        Visits an instanceof instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LALoadInstruction instr)
        Visits an laload instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LAStoreInstruction instr)
        Visits an lastore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LorInstruction instr)
        Visits an lor instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(LXorInstruction instr)
        Visits an lxor instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(MonitorEnterInstruction instr)
        Visits a monitorenter instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(MonitorExitInstruction instr)
        Visits a monitorexit instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(SAStoreInstruction instr)
        Visits a sastore instruction.
        Parameters:
        instr - the visited instruction
      • visit

        public void visit​(WideIIncInstruction instr)
        Visits a wide iinc instruction.
        Parameters:
        instr - the visited instruction