类 ExceptionInstructionChecker

  • 所有已实现的接口:
    proguard.classfile.instruction.visitor.InstructionVisitor

    public class ExceptionInstructionChecker
    extends java.lang.Object
    implements proguard.classfile.instruction.visitor.InstructionVisitor
    This class can tell whether an instruction might throw exceptions.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      int firstExceptionThrowingInstructionOffset​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int startOffset, int endOffset)
      Returns the offset of the first instruction in the specified block of code that may throw exceptions, or the end offset if there is none.
      int lastExceptionThrowingInstructionOffset​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int startOffset, int endOffset)
      Returns the offset after the last instruction in the specified block of code that may throw exceptions, or the start offset if there is none.
      boolean mayThrowExceptions​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute)
      Returns whether the specified method may throw exceptions.
      boolean mayThrowExceptions​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int offset)
      Returns whether the specified instruction may throw exceptions.
      boolean mayThrowExceptions​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int startOffset, int endOffset)
      Returns whether the specified block of code may throw exceptions.
      boolean mayThrowExceptions​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int offset, proguard.classfile.instruction.Instruction instruction)
      Returns whether the given instruction may throw exceptions.
      void visitAnyInstruction​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int offset, proguard.classfile.instruction.Instruction instruction)  
      void visitConstantInstruction​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int offset, proguard.classfile.instruction.ConstantInstruction constantInstruction)  
      void visitSimpleInstruction​(proguard.classfile.Clazz clazz, proguard.classfile.Method method, proguard.classfile.attribute.CodeAttribute codeAttribute, int offset, proguard.classfile.instruction.SimpleInstruction simpleInstruction)  
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • 从接口继承的方法 proguard.classfile.instruction.visitor.InstructionVisitor

        visitAnySwitchInstruction, visitBranchInstruction, visitLookUpSwitchInstruction, visitTableSwitchInstruction, visitVariableInstruction
    • 构造器详细资料

      • ExceptionInstructionChecker

        public ExceptionInstructionChecker()
    • 方法详细资料

      • mayThrowExceptions

        public boolean mayThrowExceptions​(proguard.classfile.Clazz clazz,
                                          proguard.classfile.Method method,
                                          proguard.classfile.attribute.CodeAttribute codeAttribute)
        Returns whether the specified method may throw exceptions.
      • mayThrowExceptions

        public boolean mayThrowExceptions​(proguard.classfile.Clazz clazz,
                                          proguard.classfile.Method method,
                                          proguard.classfile.attribute.CodeAttribute codeAttribute,
                                          int startOffset,
                                          int endOffset)
        Returns whether the specified block of code may throw exceptions.
      • firstExceptionThrowingInstructionOffset

        public int firstExceptionThrowingInstructionOffset​(proguard.classfile.Clazz clazz,
                                                           proguard.classfile.Method method,
                                                           proguard.classfile.attribute.CodeAttribute codeAttribute,
                                                           int startOffset,
                                                           int endOffset)
        Returns the offset of the first instruction in the specified block of code that may throw exceptions, or the end offset if there is none.
      • lastExceptionThrowingInstructionOffset

        public int lastExceptionThrowingInstructionOffset​(proguard.classfile.Clazz clazz,
                                                          proguard.classfile.Method method,
                                                          proguard.classfile.attribute.CodeAttribute codeAttribute,
                                                          int startOffset,
                                                          int endOffset)
        Returns the offset after the last instruction in the specified block of code that may throw exceptions, or the start offset if there is none.
      • mayThrowExceptions

        public boolean mayThrowExceptions​(proguard.classfile.Clazz clazz,
                                          proguard.classfile.Method method,
                                          proguard.classfile.attribute.CodeAttribute codeAttribute,
                                          int offset)
        Returns whether the specified instruction may throw exceptions.
      • mayThrowExceptions

        public boolean mayThrowExceptions​(proguard.classfile.Clazz clazz,
                                          proguard.classfile.Method method,
                                          proguard.classfile.attribute.CodeAttribute codeAttribute,
                                          int offset,
                                          proguard.classfile.instruction.Instruction instruction)
        Returns whether the given instruction may throw exceptions.
      • visitAnyInstruction

        public void visitAnyInstruction​(proguard.classfile.Clazz clazz,
                                        proguard.classfile.Method method,
                                        proguard.classfile.attribute.CodeAttribute codeAttribute,
                                        int offset,
                                        proguard.classfile.instruction.Instruction instruction)
        指定者:
        visitAnyInstruction 在接口中 proguard.classfile.instruction.visitor.InstructionVisitor
      • visitSimpleInstruction

        public void visitSimpleInstruction​(proguard.classfile.Clazz clazz,
                                           proguard.classfile.Method method,
                                           proguard.classfile.attribute.CodeAttribute codeAttribute,
                                           int offset,
                                           proguard.classfile.instruction.SimpleInstruction simpleInstruction)
        指定者:
        visitSimpleInstruction 在接口中 proguard.classfile.instruction.visitor.InstructionVisitor
      • visitConstantInstruction

        public void visitConstantInstruction​(proguard.classfile.Clazz clazz,
                                             proguard.classfile.Method method,
                                             proguard.classfile.attribute.CodeAttribute codeAttribute,
                                             int offset,
                                             proguard.classfile.instruction.ConstantInstruction constantInstruction)
        指定者:
        visitConstantInstruction 在接口中 proguard.classfile.instruction.visitor.InstructionVisitor