Class BranchTargetFinder

    • Constructor Detail

      • BranchTargetFinder

        public BranchTargetFinder()
    • Method Detail

      • isInstruction

        public boolean isInstruction​(int offset)
        Returns whether there is an instruction at the given offset in the CodeAttribute that was visited most recently.
      • isCreation

        public boolean isCreation​(int offset)
        Returns whether the instruction at the given offset creates a new, uninitialized object instance, in the CodeAttribute that was visited most recently.
      • isInitializer

        public boolean isInitializer​(int offset)
        Returns whether the instruction at the given offset is the special invocation of an instance initializer, in the CodeAttribute that was visited most recently.
      • isTarget

        public boolean isTarget​(int offset)
        Returns whether the instruction at the given offset is the target of any kind in the CodeAttribute that was visited most recently.
      • isBranchOrigin

        public boolean isBranchOrigin​(int offset)
        Returns whether the instruction at the given offset is the origin of a branch instruction in the CodeAttribute that was visited most recently.
      • isBranchTarget

        public boolean isBranchTarget​(int offset)
        Returns whether the instruction at the given offset is the target of a branch instruction in the CodeAttribute that was visited most recently.
      • isAfterBranch

        public boolean isAfterBranch​(int offset)
        Returns whether the instruction at the given offset comes right after a definite branch instruction in the CodeAttribute that was visited most recently.
      • isExceptionStart

        public boolean isExceptionStart​(int offset)
        Returns whether the instruction at the given offset is the start of an exception try block in the CodeAttribute that was visited most recently.
      • isExceptionEnd

        public boolean isExceptionEnd​(int offset)
        Returns whether the instruction at the given offset is the end of an exception try block in the CodeAttribute that was visited most recently.
      • isExceptionHandler

        public boolean isExceptionHandler​(int offset)
        Returns whether the instruction at the given offset is the start of an exception handler in the CodeAttribute that was visited most recently.
      • isSubroutineInvocation

        public boolean isSubroutineInvocation​(int offset)
        Returns whether the instruction at the given offset is a subroutine invocation in the CodeAttribute that was visited most recently.
      • isSubroutineStart

        public boolean isSubroutineStart​(int offset)
        Returns whether the instruction at the given offset is the start of a subroutine in the CodeAttribute that was visited most recently.
      • isSubroutine

        public boolean isSubroutine​(int offset)
        Returns whether the instruction at the given offset is part of a subroutine in the CodeAttribute that was visited most recently.
      • isSubroutineReturning

        public boolean isSubroutineReturning​(int offset)
        Returns whether the subroutine at the given offset is ever returning by means of a regular 'ret' instruction.
      • subroutineStart

        public int subroutineStart​(int offset)
        Returns the start offset of the subroutine at the given offset, in the CodeAttribute that was visited most recently.
      • subroutineEnd

        public int subroutineEnd​(int offset)
        Returns the offset after the subroutine at the given offset, in the CodeAttribute that was visited most recently.
      • containsSubroutines

        public boolean containsSubroutines()
        Returns whether the method contains subroutines, in the CodeAttribute that was visited most recently.
      • visitAnyAttribute

        public void visitAnyAttribute​(Clazz clazz,
                                      Attribute attribute)
        Description copied from interface: AttributeVisitor
        Visits any Attribute instance. The more specific default implementations of this interface delegate to this method.
        Specified by:
        visitAnyAttribute in interface AttributeVisitor
      • visitAnyConstant

        public void visitAnyConstant​(Clazz clazz,
                                     Constant constant)
        Description copied from interface: ConstantVisitor
        Visits any Constant instance. The more specific default implementations of this interface delegate to this method.
        Specified by:
        visitAnyConstant in interface ConstantVisitor