Create a Java class and annotate the setter method.
// JavaParent.java
import java.beans.BeanProperty;
public class JavaParent {
private int context = 0;
public int getContext() {
return context;
}
@BeanProperty(required = true)
public void setContext(int context) {
this.context = context;
}
}
Use it as a superclass in Kotlin.
The synthetic property context will miss the annotation in Dokka.
K1:

K2
