private static boolean isRealInnerClass(PsiClass aClass) {
    if (PsiUtil.isInnerClass(aClass)) return true;
    if (!PsiUtil.isLocalOrAnonymousClass(aClass)) return false;
    if (aClass.hasModifierProperty(PsiModifier.STATIC)) return false; // check for implicit staticness
    PsiMember member = PsiTreeUtil.getParentOfType(aClass, PsiMember.class, true);
    return member != null && !member.hasModifierProperty(PsiModifier.STATIC);
  }
private static boolean isRealInnerClass(PsiClass aClass)