private void buildSubClassesMap(PsiClass aClass, Set<PsiClass> visited) {
    final PsiReferenceList extendsList = aClass.getExtendsList();
    if (extendsList != null) {
      buildSubClassesMapForList(aClass, visited, extendsList.getReferencedTypes());
    }
    final PsiReferenceList implementsList = aClass.getImplementsList();
    if (implementsList != null) {
      buildSubClassesMapForList(aClass, visited, implementsList.getReferencedTypes());
    }

    if (aClass instanceof PsiAnonymousClass) {
      buildSubClassesMapForList(aClass, visited, ((PsiAnonymousClass)aClass).getBaseClassType());
    }
  }
private void buildSubClassesMap(PsiClass aClass, Set<PsiClass> visited)