public final class GraphtUtils extends Object
Modifier and Type | Field and Description |
---|---|
static Ordering<DAGEdge<Component,Dependency>> |
DEP_EDGE_ORDER
An ordering over dependency edges.
|
Modifier and Type | Method and Description |
---|---|
static void |
checkForPlaceholders(DAGNode<Component,Dependency> graph,
org.slf4j.Logger logger)
Check a graph for placeholder satisfactions.
|
static boolean |
desireIsTransient(Desire d)
Determine whether a desire is transient.
|
static Predicate<DAGEdge<?,Dependency>> |
edgeIsTransient() |
static boolean |
edgeIsTransient(DAGEdge<?,Dependency> input) |
static DAGNode<Component,Dependency> |
findSatisfyingNode(DAGNode<Component,Dependency> graph,
QualifierMatcher qmatch,
Class<?> type)
Find a node with a satisfaction for a specified type.
|
static Set<DAGNode<Component,Dependency>> |
getPlaceholderNodes(DAGNode<Component,Dependency> graph)
Get the placeholder nodes from a graph.
|
static LinkedHashSet<DAGNode<Component,Dependency>> |
getShareableNodes(DAGNode<Component,Dependency> graph)
Find the set of shareable nodes (objects that will be replaced with instance satisfactions in
the final graph).
|
static boolean |
isShareable(DAGNode<Component,Dependency> node)
Determine if a node is a shareable component.
|
public static Ordering<DAGEdge<Component,Dependency>> DEP_EDGE_ORDER
public static void checkForPlaceholders(DAGNode<Component,Dependency> graph, org.slf4j.Logger logger) throws RecommenderConfigurationException
graph
- The graph to check.RecommenderConfigurationException
- if the graph has a placeholder satisfaction.public static Set<DAGNode<Component,Dependency>> getPlaceholderNodes(DAGNode<Component,Dependency> graph)
graph
- The graph.public static boolean isShareable(DAGNode<Component,Dependency> node)
node
- The node.true
if the component is shareable.public static boolean desireIsTransient(@Nonnull Desire d)
d
- The desire to test.true
if the desire is transient.public static boolean edgeIsTransient(DAGEdge<?,Dependency> input)
public static Predicate<DAGEdge<?,Dependency>> edgeIsTransient()
public static LinkedHashSet<DAGNode<Component,Dependency>> getShareableNodes(DAGNode<Component,Dependency> graph)
graph
- The graph to analyze.@Nullable public static DAGNode<Component,Dependency> findSatisfyingNode(DAGNode<Component,Dependency> graph, QualifierMatcher qmatch, Class<?> type)
type
- The type to look for.type
.