Probably this topic is discussed elsewhere but I can’t find that.
My proposal is to allow @JvmStatic annotation to companion object level to avoid creating a new class.
Moreover let the ability to define a own annotations to override default visibility or make method open. This can be a base work for “kotlin-spring” plugin and can be helpful in other development scopes.
Supporting @JvmStatic on regular class members wouldn’t work. The annotation only controls the generated bytecode without changing the semantics from the Kotlin point of view, and regular class members have different semantics compared to companion object members. If we wanted to support statics without declaring a companion object, that would have to be a language feature, not an annotation.
Annotations for making classes open are being worked on right now and will likely be supported in 1.0.5.
What’s your use case for changing visibility through annotations? Right now we have no plans to support something like that.