use of com.intellij.codeInspection.reference.RefClass in project intellij-community by JetBrains.
the class InitializationDependencyUtils method tabulateTransitiveInitializationDependencyClasses.
private static void tabulateTransitiveInitializationDependencyClasses(RefClass refClass, Set<RefClass> newDependencies) {
final LinkedList<RefClass> pendingClasses = new LinkedList<>();
final Set<RefClass> processedClasses = new HashSet<>();
pendingClasses.addLast(refClass);
while (!pendingClasses.isEmpty()) {
final RefClass classToProcess = pendingClasses.removeFirst();
newDependencies.add(classToProcess);
processedClasses.add(classToProcess);
final Set<RefClass> dependencies = calculateInitializationDependenciesForClass(classToProcess);
for (RefClass dependency : dependencies) {
if (!pendingClasses.contains(dependency) && !processedClasses.contains(dependency)) {
pendingClasses.addLast(dependency);
}
}
}
newDependencies.remove(refClass);
}
Aggregations