nl.tudelft.simulation.dsol.interpreter.classfile
Class MethodDescriptor

java.lang.Object
  extended by nl.tudelft.simulation.dsol.interpreter.classfile.MethodDescriptor

public class MethodDescriptor
extends Object

A MethodDescriptor
(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.

Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:25:12 $
Author:
Peter Jacobs

Constructor Summary
MethodDescriptor(DataInput dataInput, Constant[] constantPool)
          constructs a new MethodDescriptor
 
Method Summary
 int getBytePosition(int operationIndex)
          returns the bytePosition of the operation.
 ExceptionEntry[] getExceptionTable()
          returns the exception table of the method
 LineNumber[] getLineNumberTable()
          returns the linenumber table of the method
 LocalVariableDescriptor[] getLocalVariableTable()
          returns the localvariable descriptors
 int getMaxStack()
          returns the maximum stack size of this method
 AccessibleObject getMethod()
           
 MethodSignature getMethodSignature()
           
 String getName()
          returns the name of the method
 Operation getOperation(int bytePosition)
          returns the operation at bytePosition
 int getOperationIndex(int bytePosition)
          returns the index number of the operation in the operationtable of the operation starting at bytePosition
 Operation[] getOperations()
          returns the operations of the method.
 void setMethod(AccessibleObject method)
          sets the method of this descriptor
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodDescriptor

public MethodDescriptor(DataInput dataInput,
                        Constant[] constantPool)
                 throws IOException
constructs a new MethodDescriptor

Parameters:
dataInput - the dataInput
constantPool - the constantPool
Throws:
IOException - on ioException
Method Detail

getBytePosition

public int getBytePosition(int operationIndex)
returns the bytePosition of the operation.

Parameters:
operationIndex - the n-th operation
Returns:
the bytePostion

getExceptionTable

public ExceptionEntry[] getExceptionTable()
returns the exception table of the method

Returns:
the exceptiontable

getLineNumberTable

public LineNumber[] getLineNumberTable()
returns the linenumber table of the method

Returns:
the linenumber table

getLocalVariableTable

public LocalVariableDescriptor[] getLocalVariableTable()
returns the localvariable descriptors

Returns:
the localvairable descriptors

getMaxStack

public int getMaxStack()
returns the maximum stack size of this method

Returns:
int the maximum stacksize of this method

getMethod

public AccessibleObject getMethod()
Returns:
Returns the method

getMethodSignature

public MethodSignature getMethodSignature()
Returns:
Returns the methodSignature

getName

public String getName()
returns the name of the method

Returns:
the name of the method

getOperations

public Operation[] getOperations()
returns the operations of the method.

Returns:
the operations of the method.

getOperationIndex

public int getOperationIndex(int bytePosition)
returns the index number of the operation in the operationtable of the operation starting at bytePosition

Parameters:
bytePosition - the bytePosition
Returns:
the number

getOperation

public Operation getOperation(int bytePosition)
returns the operation at bytePosition

Parameters:
bytePosition - the position to start
Returns:
the operation

setMethod

public void setMethod(AccessibleObject method)
sets the method of this descriptor

Parameters:
method - the method


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