boolean (@NotNull PsiModifierListOwner owner) { if (owner instanceof PsiMethod) { PsiType returnType = ((PsiMethod)owner).getReturnType(); return returnType != null && !(returnType instanceof PsiPrimitiveType); } return !(owner instanceof PsiClass); }