KSP, like Java’s annotation processor, cannot modify source code, it is only capable of generating new code. It cannot add functions/properties to existing classes, for example. While you can use KSP to generate extension functions which look like adding members to a class, it cannot be used to generate overrides like
hashCode()
Unlike a full-fledged compiler plugin, processors cannot modify the code. A compiler plugin that changes language semantics can sometimes be very confusing. KSP avoids that by treating the source programs as read-only.