Ejemplo n.º 1
0
 private void findParents(JavaClass jclass, Set<JavaClass> changedParents) {
   for (JavaClass parent : getParents(jclass)) {
     if (changedParents.add(parent)) {
       findParents(parent, changedParents);
     }
   }
 }
Ejemplo n.º 2
0
 public Set<String> getIndexedClasses() {
   Set<String> classes = newHashSet();
   Set<JavaClass> vertexSet = graph.vertexSet();
   for (JavaClass each : vertexSet) {
     classes.add(each.getName());
   }
   return classes;
 }
Ejemplo n.º 3
0
  public Set<JavaClass> findClasses(Collection<File> changedFiles) {
    // First update class index
    List<String> changedClassesNames = new ArrayList<String>();
    for (File changedFile : changedFiles) {
      String changedClassname = builder.classFileChanged(changedFile);
      if (changedClassname != null) {
        changedClassesNames.add(changedClassname);
      }
    }

    // Then find dependencies
    Set<JavaClass> changedClasses = newHashSet();
    for (String changedClassesName : changedClassesNames) {
      JavaClass javaClass = builder.getClass(changedClassesName);
      if (javaClass != null) {
        addToIndex(javaClass);
        changedClasses.add(javaClass);
      }
    }
    builder.clear();
    return changedClasses;
  }