Class Node

  • All Implemented Interfaces:
    java.lang.Comparable<Node>

    public final class Node
    extends java.lang.Object
    implements java.lang.Comparable<Node>
    The class Node represents the nodes in a dependency and slice graph.

    During the analysis Decycle will create Node instances by calling classNode(String) that have the type CLASS for all classes and types it will encounter. After that Decycle will create Node instances for groups of class nodes. The first grouping level creates nodes with type PACKAGE (by calling packageNode(String)) representing the packages of the analyzed classes. Then, if rules for slicings have been defined, slice nodes will be created using sliceNode(String, String), which have the name of the slicing as type.

    The name of a node is the class name, the package name, or the slice name.

    Nodes are connected to other nodes with edges.

    • 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:
        compareTo in interface java.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:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object