Class InvokeInstruction

All Implemented Interfaces:
Serializable, Cloneable, Constants
Direct Known Subclasses:
InvokeDynamic, INVOKEINTERFACE

public class InvokeInstruction extends FieldOrMethod
Super class for the INVOKExxx family of instructions.
Version:
$Id: InvokeInstruction.java,v 1.6 2009/10/05 17:35:36 aclement Exp $
Author:
M. Dahm
See Also:
Serialized Form
  • Constructor Details

    • InvokeInstruction

      public InvokeInstruction(short opcode, int index)
      Parameters:
      index - to constant pool
  • Method Details

    • toString

      public String toString(ConstantPool cp)
      Overrides:
      toString in class InstructionCP
      Returns:
      mnemonic for instruction with symbolic references resolved
    • consumeStack

      public int consumeStack(ConstantPool cpg)
      Also works for instructions whose stack effect depends on the constant pool entry they reference.
      Overrides:
      consumeStack in class Instruction
      Returns:
      Number of words consumed from stack by this instruction
    • produceStack

      public int produceStack(ConstantPool cpg)
      Also works for instructions whose stack effect depends on the constant pool entry they reference.
      Overrides:
      produceStack in class Instruction
      Returns:
      Number of words produced onto stack by this instruction
    • getType

      public Type getType(ConstantPool cpg)
      Overrides:
      getType in class InstructionCP
      Returns:
      return type of referenced method.
    • getMethodName

      public String getMethodName(ConstantPool cpg)
      Returns:
      name of referenced method.
    • getReturnType

      public Type getReturnType(ConstantPool cpg)
      Returns:
      return type of referenced method.
    • getArgumentTypes

      public Type[] getArgumentTypes(ConstantPool cpg)
      Returns:
      argument types of referenced method.