square/javapoet

class to TypeSpec

AppleLiang opened this issue · 1 comments

We currently have a use case of generating java classes based on a scheme wrapped in a service response. We want to add some validation in our CI pipeline to verify if these generated classes match the schemas. Does javapoet currently support generating a TypeSpec from a java class?

Thanks

Unfortunately no. The closest we come is functions to do create overrides, but the method bodies will all be empty.

https://square.github.io/javapoet/1.x/javapoet/