Certain specifications of my project require me to create POJO classes from information provided via an excel sheet or JSON; then creating objects of that class with relevant information at hand that will be used later in the code.
Extracting relevant data from excel sheets and JSON is not an issue. I was even able to create POJO classes dynamically thanks to this answer. But I'm unsure if it is possible to create objects of this class. As this guy mentioned in his above answer that -
But the problem is: you have no way of coding against these methods, as they don't exist at compile-time, so I don't know what good this will do you.
Is it possible to instantiate the class created in the above answer? If so, how? If not, what are other alternatives to this problem? Or should I change my approach regarding this specification and think of some other option?
You can use reflection to instantiate the generated classses and access the provided methods.