boolean (PsiClass aClass) { for (final PsiMethod method : aClass.findMethodsByName("writeObject", true)) { if (SerializationUtils.isWriteObject(method)) { return ControlFlowUtils.methodAlwaysThrowsException((PsiMethod)method.getNavigationElement()); } } return false; }