edu.mit.ai.psg.jeva.examples
Class TraceAllEvalHook.FreeSimpleNamesCollector

java.lang.Object
  |
  +--edu.mit.ai.psg.jeva.JevaVisitorBase
        |
        +--edu.mit.ai.psg.jeva.examples.TraceAllEvalHook.FreeSimpleNamesCollector

public static class TraceAllEvalHook.FreeSimpleNamesCollector
extends JevaVisitorBase

Collect free simple names in node


Inner Class Summary
static class TraceAllEvalHook.FreeSimpleNamesCollector.NameEnv
           
 
Method Summary
static Collection collect(IJevaNode node)
          Entry point: collects simple free names in node and returns the sorted set.
 Object visit(IClassBodyDeclaration node, Object data)
          Doesn't explore nested declarations
 Object visit(IDeclarationNode node, Object data)
          Doesn't explore nested declarations
 Object visit(IJevaNode node, Object data)
          default: explore all children
 Object visit(JNName node, Object data)
          Collects only simple names not in data nameEnv
 Object visit(JNSBlock node, Object data)
          Doesn't pass name defintions out of blocks
 Object visit(JNSVariableDeclarator node, Object data)
          Adds locally defined name to data nameEnv, and collects initializer
 
Methods inherited from class edu.mit.ai.psg.jeva.JevaVisitorBase
visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit, visit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

collect

public static Collection collect(IJevaNode node)
Entry point: collects simple free names in node and returns the sorted set.

visit

public Object visit(IJevaNode node,
                    Object data)
default: explore all children
Overrides:
visit in class JevaVisitorBase

visit

public Object visit(IDeclarationNode node,
                    Object data)
Doesn't explore nested declarations
Overrides:
visit in class JevaVisitorBase

visit

public Object visit(IClassBodyDeclaration node,
                    Object data)
Doesn't explore nested declarations
Overrides:
visit in class JevaVisitorBase

visit

public Object visit(JNName node,
                    Object data)
Collects only simple names not in data nameEnv
Overrides:
visit in class JevaVisitorBase

visit

public Object visit(JNSVariableDeclarator node,
                    Object data)
Adds locally defined name to data nameEnv, and collects initializer
Overrides:
visit in class JevaVisitorBase

visit

public Object visit(JNSBlock node,
                    Object data)
Doesn't pass name defintions out of blocks
Overrides:
visit in class JevaVisitorBase

Copyright (c) 1996-1999
Massachusetts Institute of Technology

Feedback: jeva-bugs@ai.mit.edu