nl.tudelft.simulation.dsol.interpreter.operations
Class RET

java.lang.Object
  extended by nl.tudelft.simulation.dsol.interpreter.Operation
      extended by nl.tudelft.simulation.dsol.interpreter.operations.JumpOperation
          extended by nl.tudelft.simulation.dsol.interpreter.operations.RET

public class RET
extends JumpOperation

The RET operation as defined in http://java.sun.com/docs/books/vmspec/2nd-edition/html/Instructions2.doc12.html .

(c) copyright 2002-2005 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.4
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:07 $
Author:
Peter Jacobs Alexander Verbraeck

Field Summary
static int OP
          OP refers to the operand code
 
Fields inherited from class nl.tudelft.simulation.dsol.interpreter.Operation
BREAKPOINT, IMPDEP1, IMPDEP2, OPCODE_BYTE_LENGTH
 
Constructor Summary
RET(DataInput dataInput)
          constructs a new RET
RET(DataInput dataInput, boolean widened)
          constructs a new RET
 
Method Summary
 int execute(OperandStack stack, Constant[] constantPool, LocalVariable[] localVariables)
          executes the operation
 int getByteLength()
           
 int getOpcode()
           
 
Methods inherited from class nl.tudelft.simulation.dsol.interpreter.Operation
toString, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OP

public static final int OP
OP refers to the operand code

See Also:
Constant Field Values
Constructor Detail

RET

public RET(DataInput dataInput)
    throws IOException
constructs a new RET

Parameters:
dataInput - the dataInput to read
Throws:
IOException - on IOException

RET

public RET(DataInput dataInput,
           boolean widened)
    throws IOException
constructs a new RET

Parameters:
dataInput - the dataInput to read
widened - whether or not to widen
Throws:
IOException - on IOException
Method Detail

execute

public int execute(OperandStack stack,
                   Constant[] constantPool,
                   LocalVariable[] localVariables)
Description copied from class: JumpOperation
executes the operation

Specified by:
execute in class JumpOperation
Parameters:
stack - the stack to operate on
constantPool - the constantpool
localVariables - the localvariables
Returns:
int the offset in bytes relative to the operand byte of this operation
See Also:
#execute(nl.tudelft.simulation.dsol.interpreter.OperandStack, nl.tudelft.simulation.dsol.interpreter.classfile.Constant[], nl.tudelft.simulation.dsol.interpreter.LocalVariable[])

getByteLength

public int getByteLength()
Specified by:
getByteLength in class Operation
Returns:
Returs the byteLength
See Also:
Operation.getByteLength()

getOpcode

public int getOpcode()
Specified by:
getOpcode in class Operation
Returns:
Returns the opcode of the operation
See Also:
Operation.getOpcode()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.