if (!TypeConversionUtil.isVoidType(returnType)) return false;
PsiParameter[] parameters = method.getParameterList().getParameters();
if (parameters.length != 1) return false;
if (!parameters[0].getType().equalsToText("java.io.ObjectOutputStream")) return false;
if (method.hasModifierProperty(PsiModifier.STATIC)) return false;
<BUG>PsiClass aClass = method.getContainingClass();
if (aClass != null && !isSerializable(aClass)) return false;
return true;</BUG>
}
private static boolean isWriteReplaceMethod(PsiMethod method) {

if (!TypeConversionUtil.isVoidType(returnType)) return false;
PsiParameter[] parameters = method.getParameterList().getParameters();
if (parameters.length != 1) return false;
if (!parameters[0].getType().equalsToText("java.io.ObjectOutputStream")) return false;
if (method.hasModifierProperty(PsiModifier.STATIC)) return false;
PsiClass aClass = method.getContainingClass();
return aClass == null || isSerializable(aClass);
}
private static boolean isWriteReplaceMethod(PsiMethod method) {
