public class NodeProcessors
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static NodeProcessor |
instantiate()
Create a node processor that will instantiate nodes.
|
static NodeProcessor |
instantiate(NodeInstantiator inst)
Create a node processor that will instantiate nodes.
|
static DAGNode<Component,Dependency> |
processNodes(DAGNode<Component,Dependency> graph,
java.util.Collection<DAGNode<Component,Dependency>> toReplace,
NodeProcessor proc)
Process a set of nodes in a graph using a node processor.
|
static NodeProcessor |
simulateInstantiation()
Create a node processor that will simulate instantiating nodes.
|
public static NodeProcessor instantiate()
Create a node processor that will instantiate nodes. It will return nodes whose satisfactions have been replaced with instance satisfactions containing the instance.
public static NodeProcessor instantiate(NodeInstantiator inst)
Create a node processor that will instantiate nodes. It will return nodes whose satisfactions have been replaced with instance satisfactions containing the instance.
inst
- The node instantiator to use when instantiating nodes.public static NodeProcessor simulateInstantiation()
Create a node processor that will simulate instantiating nodes.
public static DAGNode<Component,Dependency> processNodes(DAGNode<Component,Dependency> graph, java.util.Collection<DAGNode<Component,Dependency>> toReplace, NodeProcessor proc) throws InjectionException
Process a set of nodes in a graph using a node processor. Each node is replaced by the result of processing it with a NodeProcessor
. If a node changes because one of its adjacent nodes was replaced, the original is passed as the original
parameter to NodeProcessor.processNode(DAGNode, DAGNode)
.
graph
- The graph to process.toReplace
- The nodes in the graph to process.proc
- The processor to use.InjectionException