标签:
publicstaticObject newProxyInstance(ClassLoader loader,Class<?>[] interfaces,InvocationHandler h)throwsIllegalArgumentException{if(h ==null){thrownewNullPointerException();}Class cl = getProxyClass(loader, interfaces);try{Constructor cons = cl.getConstructor(constructorParams);return(Object) cons.newInstance(newObject[]{ h });}catch(NoSuchMethodException e){thrownewInternalError(e.toString());}catch(IllegalAccessException e){thrownewInternalError(e.toString());}catch(InstantiationException e){thrownewInternalError(e.toString());}catch(InvocationTargetException e){thrownewInternalError(e.toString());}}
标签:
原文地址:http://www.cnblogs.com/lsx1993/p/4631525.html