Class MethodAnalyzer


  • public class MethodAnalyzer
    extends java.lang.Object
    The MethodAnalyzer performs several functions. It "analyzes" the instructions and infers the register types for each register, it can deodex odexed instructions, and it can verify the bytecode. The analysis and verification are done in two separate passes, because the analysis has to process instructions multiple times in some cases, and there's no need to perform the verification multiple times, so we wait until the method is fully analyzed and then verify it. Before calling the analyze() method, you must have initialized the ClassPath by calling ClassPath.InitializeClassPath
    • Constructor Detail

      • MethodAnalyzer

        public MethodAnalyzer​(@Nonnull
                              ClassPath classPath,
                              @Nonnull
                              Method method,
                              @Nullable
                              InlineMethodResolver inlineResolver,
                              boolean normalizeVirtualMethods)
    • Method Detail

      • getClassPath

        @Nonnull
        public ClassPath getClassPath()
      • getAnalyzedInstructions

        public java.util.List<AnalyzedInstruction> getAnalyzedInstructions()
      • getInstructions

        public java.util.List<Instruction> getInstructions()
      • getParamRegisterCount

        public int getParamRegisterCount()
      • getInstructionAddress

        public int getInstructionAddress​(@Nonnull
                                         AnalyzedInstruction instruction)
      • isNotWideningConversion

        public static boolean isNotWideningConversion​(RegisterType originalType,
                                                      RegisterType newType)