Class DexCodeVisitor

  • Direct Known Subclasses:
    DexCodeNode

    public class DexCodeVisitor
    extends java.lang.Object
    • Constructor Detail

      • DexCodeVisitor

        public DexCodeVisitor()
    • Method Detail

      • visitRegister

        public void visitRegister​(int total)
      • visitStmt2R1N

        public void visitStmt2R1N​(Op op,
                                  int distReg,
                                  int srcReg,
                                  int content)
         OP_X_INT_LIT8
         
        Parameters:
        op -
        distReg -
        srcReg -
        content -
      • visitStmt3R

        public void visitStmt3R​(Op op,
                                int a,
                                int b,
                                int c)
        
         OP_ADD
         OP_SUB
         OP_MUL
         OP_DIV
         OP_REM
         OP_AND
         OP_OR
         OP_XOR
         OP_SHL
         OP_SHR
         OP_USHR
         OP_CMPL
         OP_CMPG
         OP_CMP
         OP_AGETX
         OP_APUTX
         
      • visitTypeStmt

        public void visitTypeStmt​(Op op,
                                  int a,
                                  int b,
                                  java.lang.String type)
         OP_INSTANCE_OF
         OP_NEW_ARRAY
         OP_CHECK_CAST
         OP_NEW_INSTANCE
         
        Parameters:
        op -
        a -
        b -
        type -
      • visitConstStmt

        public void visitConstStmt​(Op op,
                                   int ra,
                                   java.lang.Object value)
         CONST * CONST_WIDE * CONST_STRING * CONST_CLASS *
         
        Parameters:
        op -
        ra -
        value - int/long/type
      • visitFillArrayDataStmt

        public void visitFillArrayDataStmt​(Op op,
                                           int ra,
                                           java.lang.Object array)
      • visitEnd

        public void visitEnd()
      • visitFieldStmt

        public void visitFieldStmt​(Op op,
                                   int a,
                                   int b,
                                   Field field)
         OP_IGETX a,b field
         OP_IPUTX a,b field
         OP_SGETX a field
         OP_SPUTX a field
         
        Parameters:
        op -
        a -
        b -
        field -
      • visitFilledNewArrayStmt

        public void visitFilledNewArrayStmt​(Op op,
                                            int[] args,
                                            java.lang.String type)
         OP_FILLED_NEW_ARRAY
         
        Parameters:
        op -
        args -
        type -
      • visitJumpStmt

        public void visitJumpStmt​(Op op,
                                  int a,
                                  int b,
                                  DexLabel label)
         OP_IF_EQ
         OP_IF_NE
         OP_IF_LT
         OP_IF_GE
         OP_IF_GT
         OP_IF_LE
         OP_GOTO
         OP_IF_EQZ
         OP_IF_NEZ
         OP_IF_LTZ
         OP_IF_GEZ
         OP_IF_GTZ
         OP_IF_LEZ
         
        Parameters:
        op -
        a -
        b -
        label -
      • visitLabel

        public void visitLabel​(DexLabel label)
      • visitSparseSwitchStmt

        public void visitSparseSwitchStmt​(Op op,
                                          int ra,
                                          int[] cases,
                                          DexLabel[] labels)
      • visitMethodStmt

        public void visitMethodStmt​(Op op,
                                    int[] args,
                                    Method method)
         OP_INVOKE_VIRTUAL
         OP_INVOKE_SUPER
         OP_INVOKE_DIRECT
         OP_INVOKE_STATIC
         OP_INVOKE_INTERFACE
         
        Parameters:
        op -
        args -
        method -
      • visitMethodStmt

        public void visitMethodStmt​(Op op,
                                    int[] args,
                                    java.lang.String name,
                                    Proto proto,
                                    MethodHandle bsm,
                                    java.lang.Object... bsmArgs)
         OP_INVOKE_CUSTOM
         
      • visitMethodStmt

        public void visitMethodStmt​(Op op,
                                    int[] args,
                                    Method bsm,
                                    Proto proto)
         OP_INVOKE_POLYMORPHIC
         
      • visitStmt2R

        public void visitStmt2R​(Op op,
                                int a,
                                int b)
         OP_MOVE*
         a = a X b
         OP_ARRAY_LENGTH
         a=Xb
         X_TO_Y
         
        Parameters:
        op -
        a -
        b -
      • visitStmt1R

        public void visitStmt1R​(Op op,
                                int reg)
         OP_RETURN_X
         OP_THROW_X
         OP_MONITOR_ENTER
         OP_MONITOR_EXIT
         OP_MOVE_RESULT_X
         OP_MOVE_EXCEPTION_X
         
        Parameters:
        op -
        reg -
      • visitPackedSwitchStmt

        public void visitPackedSwitchStmt​(Op op,
                                          int aA,
                                          int first_case,
                                          DexLabel[] labels)
      • visitTryCatch

        public void visitTryCatch​(DexLabel start,
                                  DexLabel end,
                                  DexLabel[] handler,
                                  java.lang.String[] type)