private static boolean hasTypeArguments(PsiElement qualifier) {
    return !PsiTreeUtil.processElements(qualifier, element -> !(element instanceof PsiReferenceParameterList) || 
                                                              ((PsiReferenceParameterList)element).getTypeParameterElements().length == 0);
  }
private static boolean hasTypeArguments(PsiElement qualifier)