can you make all the functions on an object static...
# getting-started
t
can you make all the functions on an object static by annotating the object itself?
v
Isn't making the class a singleton object the way to go?
k
It's easy to check, Tools > Kotlin > Show Kotlin Bytecode > Decompile
t
sorry, i meant
@JvmStatic
. i have a util that i call from both kotlin and java, and i would prefer not annotating every function with
@JvmStatic
l
Why not using package function?
2
r
I agree with @Luke. Top level functions are the way to go, with a
@file:JvmName
to make it a little nicer on the Java side.
t
thanks, ended up doing that