yeah. For validation, maybe you could pass an opti...
# announcements
k
yeah. For validation, maybe you could pass an optional function to the
@JvmBuilder
annotation that gets called on the object to validate it? Not sure if that's too clumsy, but it could work. Maybe
@JvmBuilder.AddFunction
that can be applied to collections or something. But then the feature gets very complicated to implement and to use, and people probably want to add domain-specific features to their builders as well occasionally. What about doing it in an AutoValue-like way? You have to annotate your own class and that gets used, so you can add your own validation logic in there. Maybe it could automatically generate the setters for the members of the data class as synthetic members like what a lot of the other compiler plugins do?