类 BasicBranchUnit

  • 所有已实现的接口:
    BranchUnit

    public class BasicBranchUnit
    extends java.lang.Object
    implements BranchUnit
    This BranchUnit remembers the branch unit commands that are invoked on it. It doesn't consider conditions when branching.
    • 方法概要

      所有方法 实例方法 具体方法 
      修饰符和类型 方法 说明
      void branch​(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget)
      Sets the new instruction offset.
      void branchConditionally​(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget, int conditional)
      Sets the new instruction offset, depending on the certainty of the conditional branch.
      InstructionOffsetValue getTraceBranchTargets()
      Returns the accumulated branch targets that were passed to the branch unit methods.
      void reset()
      Resets the accumulated branch targets and the flag that tells whether any of the branch unit methods was called.
      void returnFromMethod()
      Returns from the method with the given value.
      void throwException()
      Handles the throwing of an exception.
      boolean wasCalled()
      Returns whether any of the branch unit methods was called.
      • 从类继承的方法 java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 字段详细资料

      • wasCalled

        protected boolean wasCalled
    • 构造器详细资料

      • BasicBranchUnit

        public BasicBranchUnit()
    • 方法详细资料

      • reset

        public void reset()
        Resets the accumulated branch targets and the flag that tells whether any of the branch unit methods was called.
      • wasCalled

        public boolean wasCalled()
        Returns whether any of the branch unit methods was called.
      • getTraceBranchTargets

        public InstructionOffsetValue getTraceBranchTargets()
        Returns the accumulated branch targets that were passed to the branch unit methods.
      • branch

        public void branch​(Clazz clazz,
                           CodeAttribute codeAttribute,
                           int offset,
                           int branchTarget)
        从接口复制的说明: BranchUnit
        Sets the new instruction offset.
        指定者:
        branch 在接口中 BranchUnit
      • branchConditionally

        public void branchConditionally​(Clazz clazz,
                                        CodeAttribute codeAttribute,
                                        int offset,
                                        int branchTarget,
                                        int conditional)
        从接口复制的说明: BranchUnit
        Sets the new instruction offset, depending on the certainty of the conditional branch.
        指定者:
        branchConditionally 在接口中 BranchUnit
      • returnFromMethod

        public void returnFromMethod()
        从接口复制的说明: BranchUnit
        Returns from the method with the given value.
        指定者:
        returnFromMethod 在接口中 BranchUnit
      • throwException

        public void throwException()
        从接口复制的说明: BranchUnit
        Handles the throwing of an exception.
        指定者:
        throwException 在接口中 BranchUnit