参考Beans类。
instantiate
public static Object instantiate(ClassLoader cls,
String beanName)
throws IOException,
ClassNotFoundExceptionInstantiate a JavaBean.
Parameters:
cls - the class-loader from which we should create the bean. If this is null, then the system class-loader is used.
beanName - the name of the bean within the class-loader. For example "sun.beanbox.foobah"
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.
instantiate
public static Object instantiate(ClassLoader cls,
String beanName)
throws IOException,
ClassNotFoundExceptionInstantiate a JavaBean.
Parameters:
cls - the class-loader from which we should create the bean. If this is null, then the system class-loader is used.
beanName - the name of the bean within the class-loader. For example "sun.beanbox.foobah"
Throws:
ClassNotFoundException - if the class of a serialized object could not be found.
IOException - if an I/O error occurs.
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货