Sunday, October 28, 2012

Retrieve Fields Information of class using java Reflection APIs

Using Java Reflecion APIs you can get fields information of class easily. just create object of class and get fields using getFields();

Java Program to retrieve fields information using java Reflection Apis :
Field[] fields = originalClassObj.getFields();
System.out.println("Fields used - ");
for (int i = 0; i < fields.length; i++) {

Author : Anuj Patel
Blog :

No comments:

Post a Comment