Class ArrayInstruction

java.lang.Object
org.apache.bcel.generic.Instruction
org.apache.bcel.generic.ArrayInstruction
All Implemented Interfaces:
Cloneable, ExceptionThrower, TypedInstruction
Direct Known Subclasses:
AALOAD, AASTORE, BALOAD, BASTORE, CALOAD, CASTORE, DALOAD, DASTORE, FALOAD, FASTORE, IALOAD, IASTORE, LALOAD, LASTORE, SALOAD, SASTORE

public abstract class ArrayInstruction extends Instruction implements ExceptionThrower, TypedInstruction
Super class for instructions dealing with array access such as IALOAD.
  • Constructor Details

    • ArrayInstruction

      ArrayInstruction()
      Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.
    • ArrayInstruction

      protected ArrayInstruction(short opcode)
      Constructs an ArrayInstruction.
      Parameters:
      opcode - of instruction.
  • Method Details

    • getExceptions

      public Class<?>[] getExceptions()
      Description copied from interface: ExceptionThrower
      Gets the exceptions that may be thrown by this instruction.
      Specified by:
      getExceptions in interface ExceptionThrower
      Returns:
      The exceptions that may be thrown by this instruction.
    • getType

      public Type getType(ConstantPoolGen cp)
      Description copied from interface: TypedInstruction
      Gets the type associated with this instruction.
      Specified by:
      getType in interface TypedInstruction
      Parameters:
      cp - The constant pool generator.
      Returns:
      type associated with the instruction.