Class NodeEditor
- java.lang.Object
-
- org.teiid.query.optimizer.relational.plantree.NodeEditor
-
public final class NodeEditor extends Object
This class is no longer really an editor. Those methods have been moved over to PlanNode. TODO: rename NodeFinder or merge completely with PlanNode
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<PlanNode>
findAllNodes(PlanNode root, int types)
static List<PlanNode>
findAllNodes(PlanNode root, int types, int stopTypes)
Find all nodes of a type, starting at the root of a tree or subtree of PlanNodes and searching downward, but not searching past nodes of type equal to stopType.static PlanNode
findNodePreOrder(PlanNode root, int types)
static PlanNode
findNodePreOrder(PlanNode root, int types, int stopTypes)
static PlanNode
findParent(PlanNode root, int types)
static PlanNode
findParent(PlanNode root, int types, int stopTypes)
Return the first parent node of the given type stopping at the given nodes.static void
removeChildNode(PlanNode parent, PlanNode child)
all of child's children become children of parent
-
-
-
Method Detail
-
removeChildNode
public static final void removeChildNode(PlanNode parent, PlanNode child)
all of child's children become children of parent
-
findNodePreOrder
public static final PlanNode findNodePreOrder(PlanNode root, int types, int stopTypes)
-
findParent
public static final PlanNode findParent(PlanNode root, int types, int stopTypes)
Return the first parent node of the given type stopping at the given nodes. The matching will start at the parent of the node passed in.- Parameters:
root
-types
- a bitwise and of type valuesstopTypes
- a bitwise and of type values to stop at- Returns:
- the matching parent, or null one is not found
-
findAllNodes
public static final List<PlanNode> findAllNodes(PlanNode root, int types, int stopTypes)
Find all nodes of a type, starting at the root of a tree or subtree of PlanNodes and searching downward, but not searching past nodes of type equal to stopType.- Parameters:
root
- the top node of the subtree, the point at which searching beginstypes
- the types of the node to search forstopTypes
- type of nodes not to search past- Returns:
- Collection of found PlanNodes
- Since:
- 4.2
-
-