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 thetypeCLASSfor all classes and types it will encounter. After that Decycle will createNodeinstances for groups of class nodes. The first grouping level creates nodes withtypePACKAGE(by callingpackageNode(String)) representing the packages of the analyzed classes. Then, if rules for slicings have been defined, slice nodes will be created usingsliceNode(String, String), which have the name of the slicing astype.The
nameof a node is the class name, the package name, or the slice name.Nodes are connected to other nodes with
edges.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static NodeclassNode(java.lang.String name)intcompareTo(Node other)booleanequals(java.lang.Object o)@NonNull java.lang.StringgetName()@NonNull java.lang.StringgetType()inthashCode()booleanhasType(java.lang.String type)static NodepackageNode(java.lang.String name)static NodesliceNode(java.lang.String type, java.lang.String name)java.lang.StringtoString()
-
-
-
Field Detail
-
CLASS
public static final java.lang.String CLASS
- See Also:
- Constant Field Values
-
PACKAGE
public static final java.lang.String PACKAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
hasType
public boolean hasType(java.lang.String type)
-
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)
-
compareTo
public int compareTo(Node other)
- Specified by:
compareToin interfacejava.lang.Comparable<Node>
-
getType
@NonNull public @NonNull java.lang.String 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
-
-