< prev index next >
src/java.desktop/share/classes/java/beans/Introspector.java
Print this page
*** 34,43 ****
--- 34,44 ----
import java.awt.Component;
import java.lang.ref.Reference;
import java.lang.ref.SoftReference;
import java.lang.reflect.Constructor;
+ import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import java.util.Map;
import java.util.ArrayList;
*** 1278,1292 ****
* First try the classloader of "sibling", then try the system
* classloader then the class loader of the current Thread.
*/
static Object instantiate(Class<?> sibling, String className)
throws InstantiationException, IllegalAccessException,
ClassNotFoundException {
// First check with sibling's classloader (if any).
ClassLoader cl = sibling.getClassLoader();
Class<?> cls = ClassFinder.findClass(className, cl);
! return cls.newInstance();
}
} // end class Introspector
//===========================================================================
--- 1279,1294 ----
* First try the classloader of "sibling", then try the system
* classloader then the class loader of the current Thread.
*/
static Object instantiate(Class<?> sibling, String className)
throws InstantiationException, IllegalAccessException,
+ NoSuchMethodException, InvocationTargetException,
ClassNotFoundException {
// First check with sibling's classloader (if any).
ClassLoader cl = sibling.getClassLoader();
Class<?> cls = ClassFinder.findClass(className, cl);
! return cls.getDeclaredConstructor().newInstance();
}
} // end class Introspector
//===========================================================================
< prev index next >