The Kotlin way is to define a top-level constructor function for your interface with the same name as your interface:
fun Focusable(focusable: Focusable): Focusable {
FocusableManager.list.add(focusable)
return focusable
}
Although, a constructor function (or a function named create
) with side effect is a very, very bad code smell.