js.tinyvm
Class DebugData

java.lang.Object
  extended by js.tinyvm.DebugData
All Implemented Interfaces:
java.io.Serializable

public class DebugData
extends java.lang.Object
implements java.io.Serializable

Author:
Michael Mirwaldt (programCounterToLineNumberMap() added), andys
See Also:
Serialized Form

Constructor Summary
DebugData()
           
 
Method Summary
 java.lang.String getClassFilename(int index)
           
 java.lang.String getClassName(int index)
           
 int getClassNameCount()
           
 int getLineNumber(int methodIndex, int pc)
           
 java.lang.String getMethodClass(int index)
           
 int getMethodCount()
           
 java.lang.String getMethodFilename(int index)
           
 java.lang.String getMethodName(int index)
           
 java.lang.String getMethodSignature(int index)
           
static DebugData load(java.io.File file)
           
static DebugData load(java.io.InputStream in)
           
 java.util.Map<java.lang.Integer,java.lang.Integer> programCounterToLineNumberMap(int methodIndex)
          returns a map with program counters with their associated line numbers
static void save(DebugData data, java.io.File file)
           
static void save(DebugData data, java.io.OutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DebugData

public DebugData()
Method Detail

getClassNameCount

public int getClassNameCount()

getClassName

public java.lang.String getClassName(int index)

getClassFilename

public java.lang.String getClassFilename(int index)

getMethodCount

public int getMethodCount()

getMethodName

public java.lang.String getMethodName(int index)

getMethodSignature

public java.lang.String getMethodSignature(int index)

getMethodFilename

public java.lang.String getMethodFilename(int index)

getMethodClass

public java.lang.String getMethodClass(int index)

getLineNumber

public int getLineNumber(int methodIndex,
                         int pc)

programCounterToLineNumberMap

public java.util.Map<java.lang.Integer,java.lang.Integer> programCounterToLineNumberMap(int methodIndex)
returns a map with program counters with their associated line numbers

Parameters:
methodIndex -
Returns:
a map with the program counters as keys and their corresponding line numbers as values. can return an empty map.

load

public static DebugData load(java.io.InputStream in)
                      throws java.io.IOException
Throws:
java.io.IOException

load

public static DebugData load(java.io.File file)
                      throws java.io.IOException
Throws:
java.io.IOException

save

public static void save(DebugData data,
                        java.io.OutputStream out)
                 throws java.io.IOException
Throws:
java.io.IOException

save

public static void save(DebugData data,
                        java.io.File file)
                 throws java.io.IOException
Throws:
java.io.IOException