boolean (@NotNull final PsiMember member) { if (!(member instanceof PsiMethod method)) { return ((PsiField)member).getInitializer() != null; } final PsiType returnType = method.getReturnType(); if (returnType == null || returnType.equals(PsiTypes.voidType()) || !method.getParameterList().isEmpty()) { return false; } final PsiCodeBlock body = method.getBody(); if (body == null) { return false; } final PsiStatement[] methodStatements = body.getStatements(); return switch (methodStatements.length) { case 1 -> methodStatements[0] instanceof PsiReturnStatement; case 0 -> true; default -> false; }; }