Implementing Towards Better PEP/Serialization

Brian Goetz brian.goetz at oracle.com
Fri Dec 11 22:31:55 UTC 2020


>
> My base test case has been the following:
>
> public class Point {
> private final float latitude; private final float longitude;
> @Data
> public Point(float latitude, float longitude) { this.latitude = 
> latitude; this.longitude = longitude; }
> public float latitude() {return latitude; }
> public float longitude() { return longitude; }
> }

Does this mean that you infer that, from the constructor argument list, 
that the serialized form for Point is (lat, long), and you use the ctor 
as the deserializer?  How do you extract the state -- do you match the 
parameter names with getter names, or with field names, or what?




More information about the amber-dev mailing list