Getting information of a class structure at runtime using Java reflection
- by Eliza Sahoo
A simple way to get the class structure information of the Class we are using in our application.
Step1: Create the Class object of the class we want to explore at run time or the class which is getting added at runtime.
Step2: As we are looking for the structure of the class, get all Constructors, Fields and methods by invoking respective functions of the Class.
Step3: print them in java console or use them as required.
Eliza