本帖最后由 秦超 于 2012-4-24 11:56 编辑
- Collection coll = (Collection) Proxy.newProxyInstance(
- Collection.class.getClassLoader(),
- new Class[] { Collection.class },
- new InvocationHandler() {
- @Override
- public Object invoke(Object proxy, Method method,
- Object[] args) throws Throwable {
-
- ArrayList arr = new ArrayList();
- return method.invoke(arr, args);//<FONT color=red>这一句返回的是什么啊?参数是什么含义(不用解释单词意思)?多谢指教!
- </FONT> }
- });
复制代码 |