nl.tudelft.simulation.dsol.interpreter
Class Operation

java.lang.Object
  extended by nl.tudelft.simulation.dsol.interpreter.Operation
Direct Known Subclasses:
ATHROW, InvokeOperation, JumpOperation, ReturnOperation, VoidOperation, WIDE

public abstract class Operation
extends Object

Represents a Java virtual machine instruction. An operation is id-ed with a short opcode and has a predefined bytelength.

(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:12 $
Author:
Peter Jacobs

Field Summary
static int BREAKPOINT
          RESERVED OPCODE
static int IMPDEP1
          RESERVED OPCODE
static int IMPDEP2
          RESERVED OPCODE
static int OPCODE_BYTE_LENGTH
          OPCODE_BYTE_LENGTH
 
Constructor Summary
Operation()
           
 
Method Summary
abstract  int getByteLength()
           
abstract  int getOpcode()
           
 String toString()
           
static String toString(MethodDescriptor methodDescriptor, Operation[] operations)
          represents a set of operations as string.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OPCODE_BYTE_LENGTH

public static final int OPCODE_BYTE_LENGTH
OPCODE_BYTE_LENGTH

See Also:
Constant Field Values

BREAKPOINT

public static final int BREAKPOINT
RESERVED OPCODE

See Also:
Constant Field Values

IMPDEP1

public static final int IMPDEP1
RESERVED OPCODE

See Also:
Constant Field Values

IMPDEP2

public static final int IMPDEP2
RESERVED OPCODE

See Also:
Constant Field Values
Constructor Detail

Operation

public Operation()
Method Detail

getOpcode

public abstract int getOpcode()
Returns:
Returns the opcode of the operation

getByteLength

public abstract int getByteLength()
Returns:
Returs the byteLength

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

toString

public static String toString(MethodDescriptor methodDescriptor,
                              Operation[] operations)
represents a set of operations as string.

Parameters:
methodDescriptor - the methodDescriptor
operations - the operations to represent
Returns:
The resulting string.


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