org.prorefactor.core
Class TreeUtils

java.lang.Object
  extended by org.prorefactor.core.TreeUtils

public class TreeUtils
extends java.lang.Object

Utilities for working with a JPNode syntax tree.


Constructor Summary
TreeUtils()
           
 
Method Summary
static java.util.ArrayList<JPNode> flatList(JPNode top)
          Get a flat list of nodes, with operator nodes moved inline.
static java.lang.String fullPreproText(JPNode top)
          Get the full, preprocessed text from a node.
static JPNode[] nodeArray(JPNode top)
          Get an array of nodes, such that the array index matches the node number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeUtils

public TreeUtils()
Method Detail

flatList

public static java.util.ArrayList<JPNode> flatList(JPNode top)
Get a flat list of nodes, with operator nodes moved inline.


fullPreproText

public static java.lang.String fullPreproText(JPNode top)
Get the full, preprocessed text from a node. When run on top node, the result is very comparable to COMPILE..PREPROCESS. This is the same as the old C++ Proparse API writeNode(). Also see org.joanju.proparse.Iwdiff.


nodeArray

public static JPNode[] nodeArray(JPNode top)
Get an array of nodes, such that the array index matches the node number.



Copyright © 2008 Joanju Software. All Rights Reserved.