Can annotations be added to parameters of a primar...
# announcements
t
Can annotations be added to parameters of a primary constructor? E.g can I convert this -
Copy code
class AddressEntity(
        var address1: String?,
        var address2: String?,
        var city: String?,
        var country: String?,
        var postalCode: String?,
        var stateOrProvince: String?
) {...
to something like this -
Copy code
class AddressEntity(
        @Property var address1: String?,
        @Property var address2: String?,
        @Property var city: String?,
        @Property var country: String?,
        @Property var postalCode: String?,
        @Property var stateOrProvince: String?
) {
s
yes
literally just paste that in
t
Thanks! (from a too-old Java programmer getting dragged into the Kotlin era 😉)
👍 1
d
#C0B8MA7FA 😉
👍 1