private static void processClassBody(int invocationCount,
                                       List<LookupElement> result,
                                       PsiClass aClass,
                                       String infix,
                                       String memberPrefix,
                                       String rest) {
    for (PsiMember[] members : new PsiMember[][] {aClass.getMethods(), aClass.getFields(), aClass.getInnerClasses()}) {
      for (PsiMember member : members) {
        if (!member.isPhysical()) continue;
        String memberName = member.getName();
        if (memberName == null) continue;
        Icon icon = member.getIcon(0);
        LookupElementBuilder element = LookupElementBuilder.create(memberName).withIcon(icon);
        if (invocationCount > 0) {
          result.add(element);
        }
        if (memberPrefix != null) {
          if (member instanceof PsiMethod || member instanceof PsiField && !infix.equals("::") || infix.equals(".")) {
            result.add(LookupElementBuilder.create(memberPrefix + memberName).withIcon(icon));
            if (member instanceof PsiClass) {
              String nestedInfix = getInfix(rest, memberName);
              if (nestedInfix != null) {
                int index = memberName.length() + nestedInfix.length();
                String nestedPrefix = memberPrefix+rest.substring(0, index);
                processClassBody(0, result, (PsiClass)member, nestedInfix, nestedPrefix, rest.substring(index));
              }
            }
          }
        }
      }
    }
  }
private static void processClassBody(int invocationCount,
                                       List<LookupElement> result,
                                       PsiClass aClass,
                                       String infix,
                                       String memberPrefix,
                                       String rest)