Often I find myself in a situation where I have a superclass that has lots of optional parameters, and those same parameters need to also be optional parameters in its subclasses.
For example, the superclass:
abstract class Plugin(val name: String, val version: String = "1.0",
val author: String = "", val description: String = "")
Extending this class is a pain. Here's an example subclass:
abstract class CyclePlugin(name: String, version: String = "1.0", author: String = "",
description: String = "", val duration: Int, val durationUnit: TimeUnit
= MILLISECONDS) : Plugin(name, version, author, description)
Note: I will answer this question with my solution. I am in search of a better solution.