com.ibm.wala.cast.tree.impl
Class CAstRewriter<RewriteContext>

java.lang.Object
  extended by com.ibm.wala.cast.tree.impl.CAstRewriter<RewriteContext>
Direct Known Subclasses:
CAstCloner, PropertyReadExpander

public abstract class CAstRewriter<RewriteContext>
extends java.lang.Object


Nested Class Summary
static interface CAstRewriter.Rewrite
           
 
Field Summary
protected  CAst Ast
           
protected  boolean recursive
           
protected  RewriteContext rootContext
           
 
Constructor Summary
CAstRewriter(CAst Ast, boolean recursive, RewriteContext rootContext)
           
 
Method Summary
protected abstract  CAstNode copyNodes(CAstNode root, RewriteContext context, java.util.Map<CAstNode,CAstNode> nodeMap)
           
protected  CAstNode flowOutTo(java.util.Map<CAstNode,CAstNode> nodeMap, CAstNode oldSource, java.lang.Object label, CAstNode oldTarget, CAstControlFlowMap orig, CAstSourcePositionMap src)
           
 CAstEntity rewrite(CAstEntity root)
           
 CAstRewriter.Rewrite rewrite(CAstNode root, CAstControlFlowMap cfg, CAstSourcePositionMap pos, CAstNodeTypeMap types, java.util.Map<CAstNode,java.util.Collection<CAstEntity>> children)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

Ast

protected final CAst Ast

recursive

protected final boolean recursive

rootContext

protected final RewriteContext rootContext
Constructor Detail

CAstRewriter

public CAstRewriter(CAst Ast,
                    boolean recursive,
                    RewriteContext rootContext)
Method Detail

copyNodes

protected abstract CAstNode copyNodes(CAstNode root,
                                      RewriteContext context,
                                      java.util.Map<CAstNode,CAstNode> nodeMap)

flowOutTo

protected CAstNode flowOutTo(java.util.Map<CAstNode,CAstNode> nodeMap,
                             CAstNode oldSource,
                             java.lang.Object label,
                             CAstNode oldTarget,
                             CAstControlFlowMap orig,
                             CAstSourcePositionMap src)

rewrite

public CAstRewriter.Rewrite rewrite(CAstNode root,
                                    CAstControlFlowMap cfg,
                                    CAstSourcePositionMap pos,
                                    CAstNodeTypeMap types,
                                    java.util.Map<CAstNode,java.util.Collection<CAstEntity>> children)

rewrite

public CAstEntity rewrite(CAstEntity root)