public class GraphBuilder extends Object
Constructor and Description |
---|
GraphBuilder() |
Modifier and Type | Method and Description |
---|---|
GraphBuilder |
addDependency(MetaClass type,
Dependency dependency)
Records a dependency on the specified type.
|
GraphBuilder |
addItem(MetaClass type,
Object item)
Record an arbitrary object to be associated with a type.
|
List<SortUnit> |
build()
Returns a graph of only incoming edges for use in a topological sort.
|
int |
getDependencyCount(MetaClass type)
Returns the number of recorded dependencies for the specified type.
|
boolean |
hasType(MetaClass type) |
String |
toDOTRepresentation() |
static String |
toDOTRepresentation(List<SortUnit> graph) |
public GraphBuilder addDependency(MetaClass type, Dependency dependency)
type
- the type to record a dependency on.dependency
- the depedencypublic GraphBuilder addItem(MetaClass type, Object item)
type
- the type to record the item for.item
- the arbitrary objectpublic int getDependencyCount(MetaClass type)
type
- the type to query for the number of dependencies.public List<SortUnit> build()
public String toDOTRepresentation()
public boolean hasType(MetaClass type)
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.