public class SortUnit extends Object implements Comparable<SortUnit>
Modifier | Constructor and Description |
---|---|
protected |
SortUnit(MetaClass type,
List<Object> items,
Set<SortUnit> dependencies) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(SortUnit o) |
static SortUnit |
create(MetaClass type,
Collection<Object> items,
Collection<SortUnit> dependencies) |
boolean |
equals(Object o) |
Set<SortUnit> |
getDependencies()
Returns a list of SortUnits which are depended on by this SortUnit.
|
int |
getDepth()
Returns the outward graph depth of this SortUnit to the outermost leaf or cycle.
|
List<Object> |
getItems()
Returns the list of arbitrary items associated with this sort unit.
|
MetaClass |
getType()
Returns the type which this sort unit represents.
|
boolean |
hasDependency(SortUnit unit)
Determines whether or not the specified SortUnit is a direct or indirect dependency of this SortUnit.
|
int |
hashCode() |
boolean |
isCyclicGraph() |
String |
toString() |
public static SortUnit create(MetaClass type, Collection<Object> items, Collection<SortUnit> dependencies)
public MetaClass getType()
public List<Object> getItems()
Typically items are units of work used by the container to orchestrate the generation of code in the correct order.
public Set<SortUnit> getDependencies()
public boolean hasDependency(SortUnit unit)
unit
- the SortUnit to check againstpublic boolean isCyclicGraph()
public int getDepth()
public int compareTo(SortUnit o)
compareTo
in interface Comparable<SortUnit>
Copyright © 2013-2015 JBoss, a division of Red Hat. All Rights Reserved.