Why is it prohibited to autogenerate many constructors visible to Java from class primary constructor with default params likes this?
@JvmOverloads
class Vid
It's not prohibited, you are just applying @JvmOverloads
to the wrong target. The proper way to annotate primary constructor is to explicitly specify constructor
keyword with @JvmOverloads
before:
class Video @JvmOverloads constructor(
private val id: Long,
val ownerId: Long,
var title: String? = null,
var imgLink: String? = null,
var videoLink: String? = null,
var description: String? = null,
var created: Date? = null,
var accessKey: String? = null,
var duration: Long? = null,
var views: Long? = null,
var comments: Long? = null
) : Entity