use of com.intellij.codeInspection.reference.RefJavaUtil in project intellij-community by JetBrains.
the class InitializationDependencyUtils method tabulateInitializationDependentClasses.
@SuppressWarnings({ "MethodWithMultipleLoops" })
private static void tabulateInitializationDependentClasses(RefElement element, Set<RefClass> dependents) {
final Collection<RefElement> references = element.getInReferences();
final RefJavaUtil refUtil = RefJavaUtil.getInstance();
for (RefElement reference : references) {
final RefClass refClass = refUtil.getTopLevelClass(reference);
if (refClass != null) {
dependents.add(refClass);
}
}
final List<RefEntity> children = element.getChildren();
for (RefEntity child : children) {
if (child instanceof RefElement) {
tabulateInitializationDependentClasses((RefElement) child, dependents);
}
}
}
use of com.intellij.codeInspection.reference.RefJavaUtil in project intellij-community by JetBrains.
the class InitializationDependencyUtils method tabulateInitializationDependencyClasses.
@SuppressWarnings({ "MethodWithMultipleLoops" })
static void tabulateInitializationDependencyClasses(RefElement element, Set<RefClass> dependencies) {
final Collection<RefElement> references = element.getOutReferences();
final RefJavaUtil refUtil = RefJavaUtil.getInstance();
for (RefElement reference : references) {
final RefClass refClass = refUtil.getTopLevelClass(reference);
if (refClass != null) {
dependencies.add(refClass);
}
}
final List<RefEntity> children = element.getChildren();
for (RefEntity child : children) {
if (child instanceof RefElement) {
tabulateInitializationDependencyClasses((RefElement) child, dependencies);
}
}
}
Aggregations