boolean (@NotNull PsiClass aClass) { final PsiMethod[] methods = aClass.findMethodsByName("writeObject", false); for (final PsiMethod method : methods) { if (isWriteObject(method)) { return true; } } return false; }