Sun SPOT API
Green Release  


com.sun.squawk
Class MethodMetadata

java.lang.Object
  extended by com.sun.squawk.MethodMetadata

public final class MethodMetadata
extends Object

A MethodMetadata instance represents all the information about a method body that is not absolutely required for execution. This includes the information found in the JVM LineNumberTable and LocalVariableTable class file attributes.

Author:
Doug Simon

Constructor Summary
MethodMetadata(int methodID, ScopedLocalVariable[] lvt, int[] lnt)
          Creates a new MethodMetadata instance.
 
Method Summary
 int[] getLineNumberTable()
          Gets the table mapping instruction addresses to the source line numbers that start at the addresses.
 ScopedLocalVariable[] getLocalVariableTable()
          Gets a table describing the scope, name and type of each local variable in the method.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodMetadata

public MethodMetadata(int methodID,
                      ScopedLocalVariable[] lvt,
                      int[] lnt)
Creates a new MethodMetadata instance.

Parameters:
methodID - the Method the metadata is for
lnt - the table mapping instruction addresses to the source line numbers that start at the addresses. The table is encoded as an int array where the high 16-bits of each element is an instruction address and the low 16-bits is the corresponding source line
lvt - the table describing the symbolic information for the local variables in the method
Method Detail

getLineNumberTable

public int[] getLineNumberTable()
Gets the table mapping instruction addresses to the source line numbers that start at the addresses. The table is encoded as an int array where the high 16-bits of each element is an instruction address and the low 16-bits is the corresponding source line.

Returns:
the line number table or null if there is no line number information for the method

getLocalVariableTable

public ScopedLocalVariable[] getLocalVariableTable()
Gets a table describing the scope, name and type of each local variable in the method.

Returns:
the local variable table or null if there is no local variable information for the method

Sun SPOT API
Green Release  


Copyright © 2006 Sun Microsystems, Inc. All Rights Reserved.