Exemplo n.º 1
0
  private void replaceVertex(JavaClass newClass) {
    List<JavaClass> incomingEdges = getParents(newClass);

    graph.removeVertex(newClass);
    graph.addVertex(newClass);
    for (JavaClass each : incomingEdges) {
      graph.addEdge(each, newClass);
    }
  }
Exemplo n.º 2
0
 private void addToGraph(JavaClass newClass) {
   if (!graph.addVertex(newClass)) {
     replaceVertex(newClass);
   }
 }