boolean (@NotNull PsiField field) { String name = field.getName(); if (CommonClassNames.SERIAL_VERSION_UID_FIELD_NAME.equals(name)) { if (!PsiTypes.longType().equals(field.getType())) return false; } else if (SERIAL_PERSISTENT_FIELDS_FIELD_NAME.equals(name)) { if (!field.hasModifierProperty(PsiModifier.PRIVATE)) return false; if (!(field.getType() instanceof PsiArrayType arrayType) || arrayType.getArrayDimensions() != 1) return false; PsiType componentType = arrayType.getComponentType(); PsiClass aClass = PsiUtil.resolveClassInClassTypeOnly(componentType); if (aClass != null && !"java.io.ObjectStreamField".equals(aClass.getQualifiedName())) return false; } else { return false; } if (!field.hasModifierProperty(PsiModifier.STATIC) || !field.hasModifierProperty(PsiModifier.FINAL)) return false; PsiClass aClass = field.getContainingClass(); return aClass == null || JavaHighlightUtil.isSerializable(aClass); }