Using Kotlin singleton from Java
Annotate your function with @JvmStatic
so a real static java function is generated when compiling.
You can use:
object OrderTitle {
@JvmStatic
fun generateMessage(context: Activity, otherParameter: AType? = null): AnotherType {
// Do some things
}
}
and then you can call it from Java:
OrderTitle.generateMessage(...)