I am using DynamDBMapper annotations on a data class (AWS Java SDK). The mapper uses a default Java constructor pattern when deserializing an object, assigning properties through setters after object instantiation.
Is there anything I can do on my end to retain read-only
val
attributes in the class constructor? I had to change everything to
var
and I hate mutability ...
k
karelpeeters
10/24/2019, 7:08 AM
Is it possible to use DynamDBMapper for Java classes with immutable properties, ie without setters? The answer for Kotlin is going to be the same.
k
Krotick
10/24/2019, 2:16 PM
Thanks!
I was wondering if there is an approach I am unfamiliar with that would allow me to have a default constructor with a proxy or smth that can allow for setters and then instantiate the real class ...