Reference Kotlinpoet created class in another class. #1846
Unanswered
DeRealMorgan
asked this question in
Q&A
Replies: 1 comment
-
You can use something like Here's a fairly self-contained example of using kotlinpoet/kotlinpoet/src/commonTest/kotlin/com/squareup/kotlinpoet/TypeSpecTest.kt Lines 1064 to 1083 in 1b9e54b |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I did not find a way how I can add a parameter in a constructor/cuntion parameter that should be generates by Kotlinpoet.
Either I dont understand the API or there is an obvious limitation or it is simply missing.
Kotlinpoet generates:
class X {}
How can I do this?:
class Y(val x: X) {}
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions