Top Description Fields Constructors Methods
org.apache.bcel.generic

public Class RET

extends Instruction
implements IndexedInstruction, TypedInstruction
Class Inheritance
All Implemented Interfaces
org.apache.bcel.generic.TypedInstruction, org.apache.bcel.generic.IndexedInstruction
Imports
java.io.DataOutputStream, .IOException, org.apache.bcel.util.ByteSequence

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

Field Summary

Modifier and TypeField and Description
private int
private boolean
Inherited from org.apache.bcel.generic.Instruction:
EMPTY_ARRAYlengthopcode

Constructor Summary

AccessConstructor and Description
pack-priv
RET()

Empty constructor needed for Instruction.readInstruction.

public
RET(final int index)

Method Summary

Modifier and TypeMethod and Description
public void
accept(final Visitor
Visitor object
v
)

Implements abstract org.apache.bcel.generic.Instruction.accept.

Call corresponding visitor method(s).
public void
dump(final DataOutputStream
Output stream
out
)

Overrides org.apache.bcel.generic.Instruction.dump.

Dump instruction as byte code to stream out.
public final int

Returns:

index of local variable containg the return address
getIndex
()

Implements org.apache.bcel.generic.IndexedInstruction.getIndex.

public Type

Returns:

return address type
getType
(final ConstantPoolGen cp)

Implements org.apache.bcel.generic.TypedInstruction.getType.

protected void
initFromFile(final ByteSequence
byte sequence to read from
bytes
,
final boolean
"wide" instruction flag
wide
)

Overrides org.apache.bcel.generic.Instruction.initFromFile.

Read needed data (e.g. index) from file.
public final void
setIndex(final int n)

Implements org.apache.bcel.generic.IndexedInstruction.setIndex.

Sets index of local variable containg the return address
private void
public String

Returns:

mnemonic for instruction
toString
(final boolean
long/short format switch
verbose
)

Overrides org.apache.bcel.generic.Instruction.toString.

Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")"
Inherited from org.apache.bcel.generic.Instruction:
consumeStackcopydisposeequalsgetComparatorgetLengthgetNamegetOpcodehashCodeisValidByteisValidShortproduceStackreadInstructionsetComparatorsetLengthsetOpcodetoStringtoString

Field Detail

indexback to summary
private int index
wideback to summary
private boolean wide

Constructor Detail

RETback to summary
pack-priv RET()

Empty constructor needed for Instruction.readInstruction. Not to be used otherwise.

RETback to summary
public RET(final int index)

Method Detail

acceptback to summary
public void accept(final Visitor v)

Implements abstract org.apache.bcel.generic.Instruction.accept.

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

Visitor object

Annotations
@Override
dumpback to summary
public void dump(final DataOutputStream out) throws IOException

Overrides org.apache.bcel.generic.Instruction.dump.

Dump instruction as byte code to stream out.

Parameters
out:DataOutputStream

Output stream

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.bcel.generic.Instruction.dump.

Thrown when an I/O exception of some sort has occurred.

getIndexback to summary
public final int getIndex()

Implements org.apache.bcel.generic.IndexedInstruction.getIndex.

Returns:int

index of local variable containg the return address

Annotations
@Override
getTypeback to summary
public Type getType(final ConstantPoolGen cp)

Implements org.apache.bcel.generic.TypedInstruction.getType.

Returns:Type

return address type

Annotations
@Override
initFromFileback to summary
protected void initFromFile(final ByteSequence bytes, final boolean wide) throws IOException

Overrides org.apache.bcel.generic.Instruction.initFromFile.

Read needed data (e.g. index) from file.

Parameters
bytes:ByteSequence

Doc from org.apache.bcel.generic.Instruction.initFromFile.

byte sequence to read from

wide:boolean

Doc from org.apache.bcel.generic.Instruction.initFromFile.

"wide" instruction flag

Annotations
@Override
Exceptions
IOException:

Doc from org.apache.bcel.generic.Instruction.initFromFile.

may be thrown if the implementation needs to read data from the file

setIndexback to summary
public final void setIndex(final int n)

Implements org.apache.bcel.generic.IndexedInstruction.setIndex.

Sets index of local variable containg the return address

Annotations
@Override
setWideback to summary
private void setWide()
toStringback to summary
public String toString(final boolean verbose)

Overrides org.apache.bcel.generic.Instruction.toString.

Doc from org.apache.bcel.generic.Instruction.toString.

Long output format: <name of opcode> "["<opcode number>"]" "("<length of instruction>")"

Parameters
verbose:boolean

long/short format switch

Returns:String

mnemonic for instruction

Annotations
@Override