【发布时间】:2014-11-04 09:27:58
【问题描述】:
所以我正在尝试为作为参数的类创建代理。
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;
}
但这由于某种原因不起作用。这有什么问题?
【问题讨论】:
-
"cl 无法解析为类型"