@@ -0,0 +1,1182 @@
+package com.yxy.chukonu.java.reflection;%0A%0Aimport java.lang.reflect.InvocationTargetException;%0A%0A/**%0A * This test class is for validating if constructor will be called during reflection.%0A * %0A * @author xianyiye%0A *%0A */%0Apublic class TestConstructorInvoking %7B%0A%09%0A%09public TestConstructorInvoking()%7B%0A%09%09System.out.println(%22General constructor%22);%0A%09%7D%0A%09%0A%09public TestConstructorInvoking(String param)%7B%0A%09%09System.out.println(%22Constructor with param%22);%0A%09%7D%0A%09%0A%09public void testMethod()%7B%0A%09%09System.out.println(%22testMethod%22);%0A%09%7D%0A%0A%09public static void main(String%5B%5D args) %7B%0A%09%09try %7B%0A%09%09%09TestConstructorInvoking object  = (TestConstructorInvoking) Class.forName(%22com.yxy.chukonu.java.reflection.TestConstructorInvoking%22).newInstance() ;%0A%09%09%09object.testMethod();%0A%09%09%09%0A%09%09%09TestConstructorInvoking object2  = (TestConstructorInvoking) Class.forName(%22com.yxy.chukonu.java.reflection.TestConstructorInvoking%22).getConstructor(String.class).newInstance(%22test%22) ;%0A%09%09%09object2.testMethod();%0A%09%09%09%0A%09%09%7D catch (ClassNotFoundException %7C InstantiationException %7C IllegalAccessException %7C IllegalArgumentException %7C InvocationTargetException %7C NoSuchMethodException %7C SecurityException e) %7B%0A%09%09%09e.printStackTrace();%0A%09%09%7D%0A%09%09%0A%0A%09%7D%0A%0A%7D%0A

add example to invoke constructor with reflection