Package de.obqo.decycle.model
Class Node
- java.lang.Object
-
- de.obqo.decycle.model.Node
-
- All Implemented Interfaces:
java.lang.Comparable<Node>
public final class Node extends java.lang.Object implements java.lang.Comparable<Node>
The classNoderepresents the nodes in a dependency and slice graph.During the analysis Decycle will create
Nodeinstances by callingclassNode(String)that have thetypeSliceType.classType()for all classes and types it will encounter. After that Decycle will createNodeinstances for groups of class nodes. The first grouping level creates nodes withtypeSliceType.packageType()(by callingpackageNode(String)) representing the packages of the analyzed classes. Then, if rules for slicings have been defined, custom slice nodes will be created usingsliceNode(String, String), which use the name of the slicing ascustom type.The
nameof a node is the class name, the package name, or the slice name.Nodes are connected to other nodes with
edges.
-
-
Field Summary
Fields Modifier and Type Field Description static java.util.Comparator<Node>COMPARATOR
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NodeclassNode(java.lang.String name)intcompareTo(Node other)java.lang.StringdisplayString()booleanequals(java.lang.Object o)@NonNull java.lang.StringgetName()@NonNull SliceTypegetType()inthashCode()booleanhasType(SliceType type)static NodepackageNode(java.lang.String name)static NodesliceNode(SliceType type, java.lang.String name)static NodesliceNode(java.lang.String type, java.lang.String name)java.lang.StringtoString()
-
-
-
Field Detail
-
COMPARATOR
public static final java.util.Comparator<Node> COMPARATOR
-
-
Method Detail
-
classNode
public static Node classNode(java.lang.String name)
-
packageNode
public static Node packageNode(java.lang.String name)
-
sliceNode
public static Node sliceNode(java.lang.String type, java.lang.String name)
-
hasType
public boolean hasType(SliceType type)
-
displayString
public java.lang.String displayString()
-
compareTo
public int compareTo(Node other)
- Specified by:
compareToin interfacejava.lang.Comparable<Node>
-
getType
@NonNull public @NonNull SliceType getType()
-
getName
@NonNull public @NonNull java.lang.String getName()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-