org.apache.bcel.generic

Class RET

Implemented Interfaces:
Cloneable, IndexedInstruction, Serializable, TypedInstruction

public class RET
extends Instruction
implements IndexedInstruction, TypedInstruction

RET - Return from subroutine
Stack: ..., -> ..., address
Version:
$Id: RET.java,v 1.1.1.1 2001/10/29 20:00:25 jvanzyl Exp $
Author:
M. Dahm

Field Summary

Fields inherited from class org.apache.bcel.generic.Instruction

length, opcode

Constructor Summary

RET(int index)

Method Summary

void
accept(Visitor v)
Call corresponding visitor method(s).
void
dump(DataOutputStream out)
Dump instruction as byte code to stream out.
int
getIndex()
Type
getType(ConstantPoolGen cp)
protected void
initFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g.
void
setIndex(int n)
Set index of local variable containg the return address
String
toString(boolean verbose)

Methods inherited from class org.apache.bcel.generic.Instruction

accept, consumeStack, copy, dump, equals, getComparator, getLength, getName, getOpcode, initFromFile, produceStack, readInstruction, setComparator, toString, toString, toString

Constructor Details

RET

public RET(int index)

Method Details

accept

public void accept(Visitor v)
Call corresponding visitor method(s). The order is: Call visitor methods of implemented interfaces first, then call methods according to the class hierarchy in descending order, i.e., the most specific visitXXX() call comes last.
Overrides:
accept in interface Instruction
Parameters:
v - Visitor object

dump

public void dump(DataOutputStream out)
            throws IOException
Dump instruction as byte code to stream out.
Overrides:
dump in interface Instruction
Parameters:
out - Output stream

getIndex

public final int getIndex()
Specified by:
getIndex in interface IndexedInstruction
Returns:
index of local variable containg the return address

getType

public Type getType(ConstantPoolGen cp)
Specified by:
getType in interface TypedInstruction
Returns:
return address type

initFromFile

protected void initFromFile(ByteSequence bytes,
                            boolean wide)
            throws IOException
Read needed data (e.g. index) from file.
Overrides:
initFromFile in interface Instruction

setIndex

public final void setIndex(int n)
Set index of local variable containg the return address
Specified by:
setIndex in interface IndexedInstruction

toString

public String toString(boolean verbose)
Overrides:
toString in interface Instruction
Returns:
mnemonic for instruction