void (final @NotNull List<? extends PsiElement> elements, final @NotNull Collection<? super LineMarkerInfo<?>> result) { Set<PsiMethod> methods = new HashSet<>(); for (PsiElement element : elements) { ProgressManager.checkCanceled(); if (element instanceof GrField) { methods.addAll(GroovyPropertyUtils.getFieldAccessors((GrField)element)); } else if (element instanceof GrMethod) { GrReflectedMethod[] reflected = ((GrMethod)element).getReflectedMethods(); if (reflected.length != 0) { Collections.addAll(methods, reflected); } else { methods.add((PsiMethod)element); } } else if (element instanceof PsiClass && !(element instanceof PsiTypeParameter)) { result.addAll(collectInheritingClasses((PsiClass)element)); } } collectOverridingMethods(methods, result); }