Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- object OrderTitle {
- @JvmOverloads
- fun generateMessage(context: Activity, otherParameter: AType? = null): AnotherType {
- // Do some things
- }
- }
- message = OrderTitle.generateMessage(activity, property);
- error: non-static method generateMessage(Activity,Property) cannot be referenced from a static context
- object OrderTitle {
- @JvmStatic
- fun generateMessage(context: Activity, otherParameter: AType? = null): AnotherType {
- // Do some things
- }
- }
- @file:JvmName("ClassNameHere")
- fun generateMessage(context: Activity, otherParameter: AType? = null): AnotherType {
- // Do some things
- ClassNameHere.generateMessage()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement