有这么一个接口:
public interface Person {
public void sayHello();
}
JDK的动态代理能不能直接根绝这个接口生成实例?
有这么一个接口:
public interface Person {
public void sayHello();
}
JDK的动态代理能不能直接根绝这个接口生成实例?
4 回答1.5k 阅读✓ 已解决
4 回答1.3k 阅读✓ 已解决
1 回答2.6k 阅读✓ 已解决
2 回答762 阅读✓ 已解决
2 回答1.8k 阅读
2 回答1.7k 阅读
2 回答1.3k 阅读
package com.lixiaofeng.www.entity;
public class Men implements Person{
}
package com.lixiaofeng.www.entity;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
public class PersonHandler implements InvocationHandler {
}
package com.lixiaofeng.www.entity;
import java.lang.reflect.Proxy;
public class PersonProxy {
}
打印:men say hello!