Getting information of a class structure at runtime using Java reflection

Posted by Eliza Sahoo on Stack Overflow See other posts from Stack Overflow or by Eliza Sahoo
Published on 2010-03-29T10:59:14Z Indexed on 2010/03/29 11:03 UTC
Read the original article Hit count: 749

Filed under:

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

© Stack Overflow or respective owner

Related posts about java