(self, read_context)
| 1692 | write_context.write_ref(field_value) |
| 1693 | |
| 1694 | def read(self, read_context): |
| 1695 | policy = read_context.policy |
| 1696 | policy.authorize_instantiation(self.type_) |
| 1697 | obj = self.type_.__new__(self.type_) |
| 1698 | read_context.reference(obj) |
| 1699 | num_fields = read_context.read_var_uint32() |
| 1700 | _check_non_negative_size(num_fields, "object field") |
| 1701 | state = {} |
| 1702 | for _ in range(num_fields): |
| 1703 | field_name = read_context.read_string() |
| 1704 | field_value = read_context.read_ref() |
| 1705 | state[field_name] = field_value |
| 1706 | policy.intercept_setstate(obj, state) |
| 1707 | for field_name, field_value in state.items(): |
| 1708 | setattr(obj, field_name, field_value) |
| 1709 | return obj |
| 1710 | |
| 1711 | |
| 1712 | class _DefaultPolicyObjectSerializer(ObjectSerializer): |
nothing calls this directly
no test coverage detected