test_class.file: plugface-core/src/test/java/org/plugface/core/internal/di/GraphTest.java
test_class.identifier: GraphTest
test_case.body: @Test
      public void shouldDetectCircularDependencies() {
          final Graph graph = new Graph();
          final Node<Integer> intNode = new Node<>(Integer.class);
          final Node<Float> floatNode = new Node<>(Float.class);
  
          try {
              graph.addEdge(intNode, floatNode).addEdge(floatNode, intNode);
              fail("It should have thrown a CircularDependencyException");
          } catch (Exception e) {
              assertThat(e, instanceOf(CircularDependencyException.class));
          }
      }
test_case.class_method_signature: GraphTest.shouldDetectCircularDependencies()
test_case.full_signature: @Test public void shouldDetectCircularDependencies()
test_case.identifier: shouldDetectCircularDependencies
test_case.invocations: addEdge addEdge fail assertThat instanceOf
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void shouldDetectCircularDependencies()
focal_class.declarator: all = new HashSet<>()
focal_class.modifier: private
focal_class.original_string: private Set<Node> all = new HashSet<>();
focal_class.type: Set<Node>
focal_class.var_name: all
focal_class.declarator: adj = new HashMap<>()
focal_class.modifier: private
focal_class.original_string: private Map<Node, List<Node>> adj = new HashMap<>();
focal_class.type: Map<Node, List<Node>>
focal_class.var_name: adj
focal_class.file: plugface-core/src/main/java/org/plugface/core/internal/di/Graph.java
focal_class.identifier: Graph
focal_class.class_method_signature: Graph.addLeaf(Node<?> node)
focal_class.full_signature: public Graph addLeaf(Node<?> node)
focal_class.identifier: addLeaf
focal_class.modifiers: public
focal_class.parameters: (Node<?> node)
focal_class.return: Graph
focal_class.signature: Graph addLeaf(Node<?> node)
focal_class.class_method_signature: Graph.addEdges(Node<?> node, Collection<Node<?>> adjs)
focal_class.full_signature: public Graph addEdges(Node<?> node, Collection<Node<?>> adjs)
focal_class.identifier: addEdges
focal_class.modifiers: public
focal_class.parameters: (Node<?> node, Collection<Node<?>> adjs)
focal_class.return: Graph
focal_class.signature: Graph addEdges(Node<?> node, Collection<Node<?>> adjs)
focal_class.class_method_signature: Graph.addEdge(Node<?> node, Node<?> adj)
focal_class.full_signature: public Graph addEdge(Node<?> node, Node<?> adj)
focal_class.identifier: addEdge
focal_class.modifiers: public
focal_class.parameters: (Node<?> node, Node<?> adj)
focal_class.return: Graph
focal_class.signature: Graph addEdge(Node<?> node, Node<?> adj)
focal_class.class_method_signature: Graph.register(Node<?> node)
focal_class.full_signature: private void register(Node<?> node)
focal_class.identifier: register
focal_class.modifiers: private
focal_class.parameters: (Node<?> node)
focal_class.return: void
focal_class.signature: void register(Node<?> node)
focal_class.class_method_signature: Graph.checkCircularDependency(Node<?> node, Node<?> adj)
focal_class.full_signature: private void checkCircularDependency(Node<?> node, Node<?> adj)
focal_class.identifier: checkCircularDependency
focal_class.modifiers: private
focal_class.parameters: (Node<?> node, Node<?> adj)
focal_class.return: void
focal_class.signature: void checkCircularDependency(Node<?> node, Node<?> adj)
focal_class.class_method_signature: Graph.resolve()
focal_class.full_signature: public Collection<Node<?>> resolve()
focal_class.identifier: resolve
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: Collection<Node<?>>
focal_class.signature: Collection<Node<?>> resolve()
focal_class.class_method_signature: Graph.topologicalSort()
focal_class.full_signature: private Collection<Node<?>> topologicalSort()
focal_class.identifier: topologicalSort
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Collection<Node<?>>
focal_class.signature: Collection<Node<?>> topologicalSort()
focal_class.class_method_signature: Graph.doTopologicalSort(Node<?> node, Map<Node, Boolean> visited, Stack<Node> stack)
focal_class.full_signature: private void doTopologicalSort(Node<?> node, Map<Node, Boolean> visited, Stack<Node> stack)
focal_class.identifier: doTopologicalSort
focal_class.modifiers: private
focal_class.parameters: (Node<?> node, Map<Node, Boolean> visited, Stack<Node> stack)
focal_class.return: void
focal_class.signature: void doTopologicalSort(Node<?> node, Map<Node, Boolean> visited, Stack<Node> stack)
focal_method.body: public Graph addEdge(Node<?> node, Node<?> adj) {
          Objects.requireNonNull(node, "Cannot attach an edge to a null node");
          if (Objects.equals(node, adj)) {
              throw new IllegalArgumentException("Cannot connect a node to itself");
          }
          register(node);
          register(adj);
          checkCircularDependency(node, adj);
          this.adj.get(node).add(adj);
          return this;
      }
focal_method.class_method_signature: Graph.addEdge(Node<?> node, Node<?> adj)
focal_method.full_signature: public Graph addEdge(Node<?> node, Node<?> adj)
focal_method.identifier: addEdge
focal_method.invocations: requireNonNull equals register register checkCircularDependency add get
focal_method.modifiers: public
focal_method.parameters: (Node<?> node, Node<?> adj)
focal_method.return: Graph
focal_method.signature: Graph addEdge(Node<?> node, Node<?> adj)