I'm facing an issue in my application where I need to generate code based on implementation properties provided by the user, such as methodName, className, arguments, and returnType. I'm using JavaPoet for code generation.
My problem lies with the returnType. I want the user to be able to simply write types like "String" or "int" and use them as return types for the generated methods. Additionally, I need to distinguish between Java built-in classes and custom classes when dealing with the returnType.
I've discovered that I can use ClassName from JavaPoet to handle custom classes, but I'm unsure how to handle Java built-in classes and determine whether the returnType provided by the user belongs to a built-in Java class or a custom class.
I would greatly appreciate any help or suggestions on how to approach this issue effectively.
Thank you in advance!