org.apache.bcel.generic

Class RET

public class RET extends Instruction implements IndexedInstruction, TypedInstruction

RET - Return from subroutine
Stack: ... -> ...

Version: $Id: RET.java 386056 2006-03-15 11:31:56Z tcurdt $

Author: M. Dahm

Field Summary
intindex
booleanwide
Constructor Summary
RET()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction().
RET(int index)
Method Summary
voidaccept(Visitor v)
Call corresponding visitor method(s).
voiddump(DataOutputStream out)
Dump instruction as byte code to stream out.
intgetIndex()
TypegetType(ConstantPoolGen cp)
protected voidinitFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.
voidsetIndex(int n)
Set index of local variable containg the return address
voidsetWide()
StringtoString(boolean verbose)

Field Detail

index

private int index

wide

private boolean wide

Constructor Detail

RET

RET()
Empty constructor needed for the Class.newInstance() statement in Instruction.readInstruction(). Not to be used otherwise.

RET

public RET(int index)

Method Detail

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.

Parameters: v Visitor object

dump

public void dump(DataOutputStream out)
Dump instruction as byte code to stream out.

Parameters: out Output stream

getIndex

public final int getIndex()

Returns: index of local variable containg the return address

getType

public Type getType(ConstantPoolGen cp)

Returns: return address type

initFromFile

protected void initFromFile(ByteSequence bytes, boolean wide)
Read needed data (e.g. index) from file.

setIndex

public final void setIndex(int n)
Set index of local variable containg the return address

setWide

private final void setWide()

toString

public String toString(boolean verbose)

Returns: mnemonic for instruction