You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@DataObject(generateConverter = true)
class Author(){
lateinit var name:String
lateinit var email:String
constructor(json:JsonObject?):this(){}
fun toJson():JsonObject{
val json = JsonObject()
return json
}
}
thanks
The text was updated successfully, but these errors were encountered:
DataObject.doc says setters shall return "this". Kotlin generates properties that return Unit (void). @Fluent properties required only for the vertx code generation.
I guess you are looking for a @DataObject class to pass it through EventBus instead of JsonObject.
I found two ways to solve this:
Manually create set props (not a good thing in kotlin)
I want to generate a data object from a kotlin class (Author), but it generates an error that I could not solve
Could not generate element for org.vult.services.Author: null
I think it may be because when generating the kotlin stub add annotations to the attributes and thus error in the generation of the converter.
EJ. @org.jetbrains.annotations.NotNull()
it is possible to generate from a kotlin class or is there an example?
This is my Gradle.Script
Author.kt
thanks
The text was updated successfully, but these errors were encountered: