Sunday, October 28, 2012

Retrieve Constructor Information of class using Java Reflection APIs

In order to retrieve Constructor information, just create object of class and call
getConstructors() api.

Java Program to retrieve Constructor Information using Java Reflection API :

Constructor[] constructor = originalClassObj.getConstructors();
System.out.println("Constructor used - ");
for (int i = 0; i < constructor.length; i++) {

Author : Anuj Patel
Blog :

No comments:

Post a Comment