FileDocCategorySizeDatePackage
ReturnInstruction.javaAPI DocJava SE 6 API4149Tue Jun 10 00:22:22 BST 2008com.sun.org.apache.bcel.internal.generic

ReturnInstruction

public abstract class ReturnInstruction extends Instruction implements ExceptionThrower, TypedInstruction, StackConsumer
Super class for the xRETURN family of instructions.
version
$Id: ReturnInstruction.java,v 1.1.2.1 2005/07/31 23:45:43 jeffsuttor Exp $
author
M. Dahm

Fields Summary
Constructors Summary
ReturnInstruction()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

protected ReturnInstruction(short opcode)

param
opcode of instruction

    super(opcode, (short)1);
  
Methods Summary
public java.lang.Class[]getExceptions()

    return new Class[] { ExceptionConstants.ILLEGAL_MONITOR_STATE };
  
public com.sun.org.apache.bcel.internal.generic.TypegetType()

    switch(opcode) {
      case Constants.IRETURN: return Type.INT;
      case Constants.LRETURN: return Type.LONG;
      case Constants.FRETURN: return Type.FLOAT;
      case Constants.DRETURN: return Type.DOUBLE;
      case Constants.ARETURN: return Type.OBJECT;
      case Constants.RETURN:  return Type.VOID;
 
    default: // Never reached
      throw new ClassGenException("Unknown type " + opcode);
    }
  
public com.sun.org.apache.bcel.internal.generic.TypegetType(com.sun.org.apache.bcel.internal.generic.ConstantPoolGen cp)

return
type associated with the instruction

    return getType();