proguard.classfile.instruction
Class SwitchInstruction

java.lang.Object
  extended by proguard.classfile.instruction.Instruction
      extended by proguard.classfile.instruction.SwitchInstruction
Direct Known Subclasses:
LookUpSwitchInstruction, TableSwitchInstruction

public abstract class SwitchInstruction
extends Instruction

This Instruction represents a simple instruction without variable arguments or constant pool references.


Field Summary
 int defaultOffset
           
 int[] jumpOffsets
           
 
Fields inherited from class proguard.classfile.instruction.Instruction
opcode
 
Constructor Summary
SwitchInstruction()
          Creates an uninitialized SwitchInstruction.
SwitchInstruction(byte opcode, int defaultOffset, int[] jumpOffsets)
          Creates a new SwitchInstruction with the given arguments.
 
Method Summary
 SwitchInstruction copy(SwitchInstruction switchInstruction)
          Copies the given instruction into this instruction.
 java.lang.String toString()
           
 java.lang.String toString(int offset)
          Returns a description of the instruction, at the given offset.
 
Methods inherited from class proguard.classfile.instruction.Instruction
accept, canonicalOpcode, getName, isCategory2, isWide, length, readByte, readInfo, readInt, readShort, readSignedByte, readSignedShort, readSignedValue, readValue, shrink, stackPopCount, stackPushCount, write, write, writeByte, writeInfo, writeInt, writeShort, writeSignedByte, writeSignedShort, writeSignedValue, writeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

defaultOffset

public int defaultOffset

jumpOffsets

public int[] jumpOffsets
Constructor Detail

SwitchInstruction

public SwitchInstruction()
Creates an uninitialized SwitchInstruction.


SwitchInstruction

public SwitchInstruction(byte opcode,
                         int defaultOffset,
                         int[] jumpOffsets)
Creates a new SwitchInstruction with the given arguments.

Method Detail

copy

public SwitchInstruction copy(SwitchInstruction switchInstruction)
Copies the given instruction into this instruction.

Parameters:
switchInstruction - the instruction to be copied.
Returns:
this instruction.

toString

public java.lang.String toString(int offset)
Description copied from class: Instruction
Returns a description of the instruction, at the given offset.

Overrides:
toString in class Instruction

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object