edu.mit.ai.psg.jeva.examples
Class TraceMethods

java.lang.Object
  |
  +--edu.mit.ai.psg.jeva.examples.TraceMethods

public class TraceMethods
extends Object

Useful methods for trace hooks.


Inner Class Summary
static class TraceMethods.FreeSimpleNamesCollector
          Collect free simple names in node by calling method TraceMethods.FreeSimpleNamesCollector.collect(IJevaNode)
 
Field Summary
static int resultStringDepthLimit
          limit on nesting depth printed for collection and array results
static int resultStringLengthLimit
          limit on number of elements printed for collection and array results
 
Constructor Summary
TraceMethods()
           
 
Method Summary
static int printSubstitutingExpressions(PrintWriter pw, IJevaNode node, Token fromToken, Object[] values, int valNum)
           
static String resultString(Object result)
           
static void traceApplications(PrintWriter pw, IJevaNode node, Object preApplyData)
          Print out source expression with values substituted for immediate subexpressions.
static void traceFreeNames(PrintWriter iw, IJevaNode node, Object evalHookData)
          Print out bindings of free names of node.
static void tracePostData(PrintWriter pw, IJevaNode node, Object evalHookPostData)
          Prints: value for expression results (nothing) for normally completed statements return value for return abrupt completions throw exception for throw abrupt completions break label for break abrupt completions continue label for continue abrupt completions Appropriate only for EvalMethods.EvalHookPostData
static void traceSource(PrintWriter iw, IJevaNode node, Object evalHookdata)
          Print out source expression for node, unindenting leading whitespace.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

resultStringLengthLimit

public static int resultStringLengthLimit
limit on number of elements printed for collection and array results

resultStringDepthLimit

public static int resultStringDepthLimit
limit on nesting depth printed for collection and array results
Constructor Detail

TraceMethods

public TraceMethods()
Method Detail

traceSource

public static void traceSource(PrintWriter iw,
                               IJevaNode node,
                               Object evalHookdata)
Print out source expression for node, unindenting leading whitespace.

traceFreeNames

public static void traceFreeNames(PrintWriter iw,
                                  IJevaNode node,
                                  Object evalHookData)
Print out bindings of free names of node.

traceApplications

public static void traceApplications(PrintWriter pw,
                                     IJevaNode node,
                                     Object preApplyData)
Print out source expression with values substituted for immediate subexpressions. Appropriate only for EvalMethods.PreApplyData.

tracePostData

public static void tracePostData(PrintWriter pw,
                                 IJevaNode node,
                                 Object evalHookPostData)
Prints: Appropriate only for EvalMethods.EvalHookPostData

resultString

public static String resultString(Object result)

printSubstitutingExpressions

public static int printSubstitutingExpressions(PrintWriter pw,
                                               IJevaNode node,
                                               Token fromToken,
                                               Object[] values,
                                               int valNum)

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-feedback@ai.mit.edu