[kotlinpoet] hello, anyone knows whether it is pos...
# squarelibraries
d
[kotlinpoet] hello, anyone knows whether it is possible to generate enum value with annotation using kotlinpoet?
1
e.g.
Copy code
val enumTypeSpecBuilder = TypeSpec.enumBuilder("MyEnum")
enumTypeSpecBuilder.addEnumConstant("SOME_VALUE") // how to add annotation to this constant value?
nvm… its in the docs
Copy code
enumTypeSpecBuilder.addEnumConstant("SOME_VALUE", TypeSpec.anonymousClassBuilder()
        .addAnnotation(MyAnnotation::class)
        .build())