Class SwitchInsn

All Implemented Interfaces:
IAttributeNode, ILineAttributeNode

public class SwitchInsn extends TargetInsnNode
  • Field Details

    • dataTarget

      private final int dataTarget
    • packed

      private final boolean packed
    • switchData

      @Nullable private @Nullable SwitchData switchData
    • def

      private int def
    • modifiedKeys

      private Object[] modifiedKeys
    • targetBlocks

      private BlockNode[] targetBlocks
    • defTargetBlock

      private BlockNode defTargetBlock
  • Constructor Details

    • SwitchInsn

      public SwitchInsn(InsnArg arg, int dataTarget, boolean packed)
  • Method Details

    • needData

      public boolean needData()
    • attachSwitchData

      public void attachSwitchData(SwitchData data, int def)
    • initBlocks

      public void initBlocks(BlockNode curBlock)
      Overrides:
      initBlocks in class TargetInsnNode
    • replaceTargetBlock

      public boolean replaceTargetBlock(BlockNode origin, BlockNode replace)
      Overrides:
      replaceTargetBlock in class TargetInsnNode
    • isSame

      public boolean isSame(InsnNode obj)
      Description copied from class: InsnNode
      'Soft' equals, don't compare arguments, only instruction specific parameters.
      Overrides:
      isSame in class InsnNode
    • copy

      public InsnNode copy()
      Description copied from class: InsnNode
      Make copy of InsnNode object.
      NOTE: can't copy instruction with result argument (SSA variable can't be used in two different assigns).
      Prefer use next methods:
      Overrides:
      copy in class InsnNode
    • toString

      public String toString()
      Overrides:
      toString in class InsnNode
    • getDataTarget

      public int getDataTarget()
    • isPacked

      public boolean isPacked()
    • getDefaultCaseOffset

      public int getDefaultCaseOffset()
    • getSwitchData

      @NotNull private @NotNull SwitchData getSwitchData()
    • getTargets

      public int[] getTargets()
    • getKeys

      public int[] getKeys()
    • getKey

      public Object getKey(int i)
    • modifyKey

      public void modifyKey(int i, Object newKey)
    • getTargetBlocks

      public BlockNode[] getTargetBlocks()
    • getDefTargetBlock

      public BlockNode getDefTargetBlock()