## Uses of Class
org.apache.bcel.generic.InstructionHandle

- Packages that use InstructionHandle
  Package | Description
  --- | ---
  org.apache.bcel.generic | This package contains the "generic" part of the Byte Code Engineering Library, i.e., classes to dynamically modify class objects and byte code instructions.
  org.apache.bcel.util | This package contains utility classes for the Byte Code Engineering Library, namely:
  org.apache.bcel.verifier.structurals | Provides a PassVerifier class mostly used internally by JustIce, yielding a control flow graph for public use as a nice side effect.

- - ### Uses of InstructionHandle in org.apache.bcel.generic

    Subclasses of InstructionHandle in org.apache.bcel.generic
    Modifier and Type | Class and Description
    --- | ---
    `class` | `BranchHandle` BranchHandle is returned by specialized InstructionList.append() whenever a BranchInstruction is appended.

    Fields in org.apache.bcel.generic declared as InstructionHandle
    Modifier and Type | Field and Description
    --- | ---
    `static InstructionHandle[]` | InstructionHandle.`EMPTY_ARRAY` Empty array.
    `protected InstructionHandle` | BranchInstruction.`target` Deprecated. (since 6.0) will be made private; do not access directly, use getter/setter
    `protected InstructionHandle[]` | Select.`targets` Deprecated. (since 6.0) will be made private; do not access directly, use getter/setter

    Methods in org.apache.bcel.generic that return InstructionHandle
    Modifier and Type | Method and Description
    --- | ---
    `InstructionHandle` | InstructionList.`append(CompoundInstruction c)` Append a compound instruction.
    `InstructionHandle` | InstructionList.`append(Instruction i)` Append an instruction to the end of this list.
    `InstructionHandle` | InstructionList.`append(Instruction i, CompoundInstruction c)` Append a compound instruction, after instruction i.
    `InstructionHandle` | InstructionList.`append(InstructionHandle ih, CompoundInstruction c)` Append a compound instruction.
    `InstructionHandle` | InstructionList.`append(InstructionHandle ih, Instruction i)` Append an instruction after instruction (handle) ih contained in this list.
    `InstructionHandle` | InstructionList.`append(InstructionHandle ih, InstructionList il)` Append another list after instruction (handle) ih contained in this list.
    `InstructionHandle` | InstructionList.`append(Instruction i, Instruction j)` Append a single instruction j after another instruction i, which must be in this list of course!
    `InstructionHandle` | InstructionList.`append(Instruction i, InstructionList il)` Append another list after instruction i contained in this list.
    `InstructionHandle` | InstructionList.`append(InstructionList il)` Append another list to this one.
    `static InstructionHandle` | InstructionList.`findHandle(InstructionHandle[] ihs, int[] pos, int count, int target)` Find the target instruction (handle) that corresponds to the given target position (byte code offset).
    `InstructionHandle` | InstructionList.`findHandle(int pos)` Get instruction handle for instruction at byte code position pos.
    `InstructionHandle` | LocalVariableGen.`getEnd()`
    `InstructionHandle` | InstructionList.`getEnd()`
    `InstructionHandle` | CodeExceptionGen.`getEndPC()`
    `InstructionHandle` | CodeExceptionGen.`getHandlerPC()`
    `InstructionHandle` | LineNumberGen.`getInstruction()`
    `InstructionHandle[]` | InstructionList.`getInstructionHandles()`
    `InstructionHandle` | InstructionHandle.`getNext()`
    `InstructionHandle` | InstructionHandle.`getPrev()`
    `InstructionHandle` | LocalVariableGen.`getStart()`
    `InstructionHandle` | InstructionList.`getStart()`
    `InstructionHandle` | CodeExceptionGen.`getStartPC()`
    `InstructionHandle` | ReturnaddressType.`getTarget()`
    `InstructionHandle` | BranchHandle.`getTarget()`
    `InstructionHandle` | BranchInstruction.`getTarget()`
    `InstructionHandle[]` | TargetLostException.`getTargets()`
    `InstructionHandle[]` | Select.`getTargets()`
    `InstructionHandle` | InstructionList.`insert(CompoundInstruction c)` Insert a compound instruction.
    `InstructionHandle` | InstructionList.`insert(Instruction i)` Insert an instruction at start of this list.
    `InstructionHandle` | InstructionList.`insert(Instruction i, CompoundInstruction c)` Insert a compound instruction before instruction i.
    `InstructionHandle` | InstructionList.`insert(InstructionHandle ih, CompoundInstruction c)` Insert a compound instruction.
    `InstructionHandle` | InstructionList.`insert(InstructionHandle ih, Instruction i)` Insert an instruction before instruction (handle) ih contained in this list.
    `InstructionHandle` | InstructionList.`insert(InstructionHandle ih, InstructionList il)` Insert another list before Instruction handle ih contained in this list.
    `InstructionHandle` | InstructionList.`insert(Instruction i, Instruction j)` Insert a single instruction j before another instruction i, which must be in this list of course!
    `InstructionHandle` | InstructionList.`insert(Instruction i, InstructionList il)` Insert another list before Instruction i contained in this list.
    `InstructionHandle` | InstructionList.`insert(InstructionList il)` Insert another list.
    `InstructionHandle` | JsrInstruction.`physicalSuccessor()` Returns an InstructionHandle to the physical successor of this JsrInstruction.

    Methods in org.apache.bcel.generic that return types with arguments of type InstructionHandle
    Modifier and Type | Method and Description
    --- | ---
    `Iterator<InstructionHandle>` | InstructionList.`iterator()`

    Methods in org.apache.bcel.generic with parameters of type InstructionHandle
    Modifier and Type | Method and Description
    --- | ---
    `CodeExceptionGen` | MethodGen.`addExceptionHandler(InstructionHandle startPc, InstructionHandle endPc, InstructionHandle handlerPc, ObjectType catchType)` Add an exception handler, i.e., specify region where a handler is active and an instruction where the actual handling is done.
    `LineNumberGen` | MethodGen.`addLineNumber(InstructionHandle ih, int srcLine)` Give an instruction a line number corresponding to the source code line.
    `LocalVariableGen` | MethodGen.`addLocalVariable(String name, Type type, InstructionHandle start, InstructionHandle end)` Adds a local variable to this method and assigns an index automatically.
    `LocalVariableGen` | MethodGen.`addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end)` Adds a local variable to this method.
    `LocalVariableGen` | MethodGen.`addLocalVariable(String name, Type type, int slot, InstructionHandle start, InstructionHandle end, int origIndex)` Adds a local variable to this method.
    `BranchHandle` | InstructionList.`append(InstructionHandle ih, BranchInstruction i)` Append an instruction after instruction (handle) ih contained in this list.
    `InstructionHandle` | InstructionList.`append(InstructionHandle ih, CompoundInstruction c)` Append a compound instruction.
    `InstructionHandle` | InstructionList.`append(InstructionHandle ih, Instruction i)` Append an instruction after instruction (handle) ih contained in this list.
    `InstructionHandle` | InstructionList.`append(InstructionHandle ih, InstructionList il)` Append another list after instruction (handle) ih contained in this list.
    `boolean` | InstructionList.`contains(InstructionHandle i)`
    `boolean` | BranchInstruction.`containsTarget(InstructionHandle ih)`
    `boolean` | LocalVariableGen.`containsTarget(InstructionHandle ih)`
    `boolean` | CodeExceptionGen.`containsTarget(InstructionHandle ih)`
    `boolean` | LineNumberGen.`containsTarget(InstructionHandle ih)`
    `boolean` | InstructionTargeter.`containsTarget(InstructionHandle ih)` Checks whether this targeter targets the specified instruction handle.
    `boolean` | Select.`containsTarget(InstructionHandle ih)`
    `static BranchInstruction` | InstructionFactory.`createBranchInstruction(short opcode, InstructionHandle target)` Create branch instruction by given opcode, except LOOKUPSWITCH and TABLESWITCH.
    `void` | InstructionList.`delete(InstructionHandle ih)` Remove instruction from this list.
    `void` | InstructionList.`delete(InstructionHandle from, InstructionHandle to)` Remove instructions from instruction `from' to instruction `to' contained in this list.
    `static InstructionHandle` | InstructionList.`findHandle(InstructionHandle[] ihs, int[] pos, int count, int target)` Find the target instruction (handle) that corresponds to the given target position (byte code offset).
    `protected int` | BranchInstruction.`getTargetOffset(InstructionHandle target)`
    `BranchHandle` | InstructionList.`insert(InstructionHandle ih, BranchInstruction i)` Insert an instruction before instruction (handle) ih contained in this list.
    `InstructionHandle` | InstructionList.`insert(InstructionHandle ih, CompoundInstruction c)` Insert a compound instruction.
    `InstructionHandle` | InstructionList.`insert(InstructionHandle ih, Instruction i)` Insert an instruction before instruction (handle) ih contained in this list.
    `InstructionHandle` | InstructionList.`insert(InstructionHandle ih, InstructionList il)` Insert another list before Instruction handle ih contained in this list.
    `void` | InstructionList.`move(InstructionHandle ih, InstructionHandle target)` Move a single instruction (handle) to a new location.
    `void` | InstructionList.`move(InstructionHandle start, InstructionHandle end, InstructionHandle target)` Take all instructions (handles) from "start" to "end" and append them after the new location "target".
    `void` | InstructionList.`redirectBranches(InstructionHandle oldTarget, InstructionHandle newTarget)` Redirect all references from oldTarget to newTarget, i.e., update targets of branch instructions.
    `void` | InstructionList.`redirectExceptionHandlers(CodeExceptionGen[] exceptions, InstructionHandle oldTarget, InstructionHandle newTarget)` Redirect all references of exception handlers from oldTarget to newTarget.
    `void` | InstructionList.`redirectLocalVariables(LocalVariableGen[] lg, InstructionHandle oldTarget, InstructionHandle newTarget)` Redirect all references of local variables from oldTarget to newTarget.
    `void` | LocalVariableGen.`setEnd(InstructionHandle end)`
    `void` | CodeExceptionGen.`setEndPC(InstructionHandle endPc)`
    `void` | CodeExceptionGen.`setHandlerPC(InstructionHandle handlerPc)`
    `void` | LineNumberGen.`setInstruction(InstructionHandle instructionHandle)`
    `void` | LocalVariableGen.`setStart(InstructionHandle start)`
    `void` | CodeExceptionGen.`setStartPC(InstructionHandle startPc)`
    `void` | BranchHandle.`setTarget(InstructionHandle ih)` Pass new target to instruction.
    `void` | BranchInstruction.`setTarget(InstructionHandle target)` Set branch target
    `void` | Select.`setTarget(int i, InstructionHandle target)` Set branch target for `i'th case
    `void` | BranchHandle.`updateTarget(InstructionHandle oldIh, InstructionHandle newIh)` Update target of instruction.
    `void` | BranchInstruction.`updateTarget(InstructionHandle oldIh, InstructionHandle newIh)`
    `void` | LocalVariableGen.`updateTarget(InstructionHandle oldIh, InstructionHandle newIh)`
    `void` | CodeExceptionGen.`updateTarget(InstructionHandle oldIh, InstructionHandle newIh)`
    `void` | LineNumberGen.`updateTarget(InstructionHandle oldIh, InstructionHandle newIh)`
    `void` | InstructionTargeter.`updateTarget(InstructionHandle oldIh, InstructionHandle newIh)` Replaces the target of this targeter from this old handle to the new handle.
    `void` | Select.`updateTarget(InstructionHandle oldIh, InstructionHandle newIh)`

    Constructors in org.apache.bcel.generic with parameters of type InstructionHandle
    Constructor and Description
    `BranchInstruction(short opcode, InstructionHandle target)` Common super constructor
    `CodeExceptionGen(InstructionHandle startPc, InstructionHandle endPc, InstructionHandle handlerPc, ObjectType catchType)` Add an exception handler, i.e., specify region where a handler is active and an instruction where the actual handling is done.
    `GOTO_W(InstructionHandle target)`
    `GOTO(InstructionHandle target)`
    `IF_ACMPEQ(InstructionHandle target)`
    `IF_ACMPNE(InstructionHandle target)`
    `IF_ICMPEQ(InstructionHandle target)`
    `IF_ICMPGE(InstructionHandle target)`
    `IF_ICMPGT(InstructionHandle target)`
    `IF_ICMPLE(InstructionHandle target)`
    `IF_ICMPLT(InstructionHandle target)`
    `IF_ICMPNE(InstructionHandle target)`
    `IFEQ(InstructionHandle target)`
    `IFGE(InstructionHandle target)`
    `IFGT(InstructionHandle target)`
    `IfInstruction(short opcode, InstructionHandle target)`
    `IFLE(InstructionHandle target)`
    `IFLT(InstructionHandle target)`
    `IFNE(InstructionHandle target)`
    `IFNONNULL(InstructionHandle target)`
    `IFNULL(InstructionHandle target)`
    `JSR_W(InstructionHandle target)`
    `JSR(InstructionHandle target)`
    `LineNumberGen(InstructionHandle ih, int srcLine)` Create a line number.
    `LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end)` Generate a local variable that with index `index'.
    `LocalVariableGen(int index, String name, Type type, InstructionHandle start, InstructionHandle end, int origIndex)` Generates a local variable that with index `index'.
    `LOOKUPSWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)`
    `LOOKUPSWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)`
    `ReturnaddressType(InstructionHandle returnTarget)` Creates a ReturnaddressType object with a target.
    `SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target)`
    `SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target)`
    `SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target, int maxGap)` Template for switch() constructs.
    `SWITCH(int[] match, InstructionHandle[] targets, InstructionHandle target, int maxGap)` Template for switch() constructs.
    `TABLESWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)`
    `TABLESWITCH(int[] match, InstructionHandle[] targets, InstructionHandle defaultTarget)`

  - ### Uses of InstructionHandle in org.apache.bcel.util

    Methods in org.apache.bcel.util with parameters of type InstructionHandle
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | InstructionFinder.CodeConstraint.`checkCode(InstructionHandle[] match)`
    `Iterator<InstructionHandle[]>` | InstructionFinder.`search(String pattern, InstructionHandle from)` Start search beginning from `from'.
    `Iterator<InstructionHandle[]>` | InstructionFinder.`search(String pattern, InstructionHandle from, InstructionFinder.CodeConstraint constraint)` Search for the given pattern in the instruction list.

  - ### Uses of InstructionHandle in org.apache.bcel.verifier.structurals

    Methods in org.apache.bcel.verifier.structurals that return InstructionHandle
    Modifier and Type | Method and Description
    --- | ---
    `InstructionHandle[]` | Subroutine.`getEnteringJsrInstructions()` Returns all the JsrInstructions that have the first instruction of this subroutine as their target.
    `InstructionHandle` | ExceptionHandler.`getHandlerStart()` Returns the InstructionHandle where the handler starts off.
    `InstructionHandle` | InstructionContext.`getInstruction()` Returns the InstructionHandle this InstructionContext is wrapped around.
    `InstructionHandle[]` | Subroutine.`getInstructions()` Returns all instructions that together form this subroutine.
    `InstructionHandle` | Subroutine.`getLeavingRET()` Returns the one and only RET that leaves the subroutine.

    Methods in org.apache.bcel.verifier.structurals with parameters of type InstructionHandle
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | Subroutine.`contains(InstructionHandle inst)` Returns if the given InstructionHandle refers to an instruction that is part of this subroutine.
    `InstructionContext` | ControlFlowGraph.`contextOf(InstructionHandle inst)` Returns the InstructionContext of a given instruction.
    `InstructionContext[]` | ControlFlowGraph.`contextsOf(InstructionHandle[] insts)` Returns the InstructionContext[] of a given InstructionHandle[], in a naturally ordered manner.
    `ExceptionHandler[]` | ExceptionHandlers.`getExceptionHandlers(InstructionHandle ih)` Returns all the ExceptionHandler instances representing exception handlers that protect the instruction ih.
    `Subroutine` | Subroutines.`getSubroutine(InstructionHandle leader)` Returns the Subroutine object associated with the given leader (that is, the first instruction of the subroutine).
    `boolean` | ControlFlowGraph.`isDead(InstructionHandle i)` Returns true, if and only if the said instruction is not reachable; that means, if it is not part of this ControlFlowGraph.
    `Subroutine` | Subroutines.`subroutineOf(InstructionHandle any)` Returns the subroutine object associated with the given instruction.

Copyright © 2004–2022 The Apache Software Foundation. All rights reserved.