Proxy.newProxyInstance(Collection.class.getClassLoader(),
new Class[]{Collection.class},
new InvocationHandler(){
@Override
public Object invoke(Object proxy,
Method method, Object[] args)
throws Throwable {
// TODO Auto-generated method stub
ArrayList arrayList = new ArrayList();
long begin = System.currentTimeMillis();
Object obj = method.invoke(arrayList, args);
long end = System.currentTimeMillis();
method.invoke(obj, args)
return obj;
}
});
invoke里面的各个参数代表什么啊,对整个函数方法来说怎么理解啊。。 |