boolean (@NotNull PsiMember psiMember) { PsiTypeElement typeElement; if (psiMember instanceof PsiMethod) { typeElement = ((PsiMethod)psiMember).getReturnTypeElement(); } else { typeElement = ((PsiField)psiMember).getTypeElement(); } return typeElement != null && StreamEx.ofTree((PsiElement)typeElement, e -> StreamEx.of(e.getChildren())) .anyMatch(e -> e instanceof PsiJavaToken && ((PsiJavaToken)e).getTokenType() == JavaTokenType.LT); }