org.apache.bcel.generic

## Interface InstructionTargeter

- All Known Implementing Classes:
    BranchInstruction, CodeExceptionGen, GOTO, GOTO_W, GotoInstruction, IF_ACMPEQ, IF_ACMPNE, IF_ICMPEQ, IF_ICMPGE, IF_ICMPGT, IF_ICMPLE, IF_ICMPLT, IF_ICMPNE, IFEQ, IFGE, IFGT, IfInstruction, IFLE, IFLT, IFNE, IFNONNULL, IFNULL, JSR, JSR_W, JsrInstruction, LineNumberGen, LocalVariableGen, LOOKUPSWITCH, Select, TABLESWITCH

      public interface InstructionTargeter

  Denote that a class targets InstructionHandles within an InstructionList. Namely the following implementers:
  Version:
    $Id$
  See Also:
    `BranchHandle`, `LocalVariableGen`, `CodeExceptionGen`

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `containsTarget(InstructionHandle ih)` Checks whether this targeter targets the specified instruction handle.
    `void` | `updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)` Replaces the target of this targeter from this old handle to the new handle.

- - ### Method Detail

    - #### containsTarget

          boolean containsTarget(InstructionHandle ih)

      Checks whether this targeter targets the specified instruction handle.

    - #### updateTarget

          void updateTarget(InstructionHandle old_ih,
                            InstructionHandle new_ih)
                     throws ClassGenException

      Replaces the target of this targeter from this old handle to the new handle.
      Parameters:
        `old_ih` - the old handle
        `new_ih` - the new handle
      Throws:
        `ClassGenException` - if old_ih is not targeted by this object

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