@NotNull
 @Override
 public Set<UsageDescriptor> getUsages() throws CollectUsagesException {
   HashSet<UsageDescriptor> descriptors = new HashSet<>();
   descriptors.addAll(myUsageDescriptors.values());
   myUsageDescriptors.clear();
   return descriptors;
 }
  private static void getAllMethodsInner(
      PsiClass clazz, List<PsiMethod> allMethods, HashSet<PsiClass> visited) {
    if (visited.contains(clazz)) return;
    visited.add(clazz);

    ContainerUtil.addAll(allMethods, clazz.getMethods());

    final PsiClass[] supers = clazz.getSupers();
    for (PsiClass aSuper : supers) {
      getAllMethodsInner(aSuper, allMethods, visited);
    }
  }