hi all — i created an annotation processor called ...
# announcements
i
hi all — i created an annotation processor called
@DataPartial
which, when annotating a data class
X
, will generate a data class
PartialX
which contains all of the fields but makes them all nullable and default null. similar to typescript’s
Partial<X>
construct. i’ve used a similar processor i wrote for java for a while, and i’ve found it to be a useful lightweight way to create DTOs and partial views of data objects, while ensuring that instances of the canonical entity stay immutable and always have required fields present. or did i re-invent a wheel that has an idiom in kotlin already? (i’m new to kotlin) https://github.com/stardogventures/stardao/blob/master/stardao-auto/src/main/java/io/stardog/stardao/auto/kotlin/DataPartialProcessor.kt