所以我试图为一个参数类创建一个代理。如何创建一个作为参数给出的类的代理
public static Object lookup(Class<?> cl,
CommunicationModule communicationModule) {
InvocationHandler handler = new InvocationHandler() { ... };
cl proxy = (cl) Proxy.newProxyInstance(cl.class.getClassLoader(),
new Class[] { cl.class }, handler);
return proxy;
}
但是这不起作用的原因。这有什么问题?
有什么错误? – 2014-11-04 09:30:04
“cl不能解析为类型” – user2443088 2014-11-04 09:33:42