📄 rundebugtest.java
字号:
/****************************************************
* 参考书籍:<<Java面向对象编程>> *
* 技术支持网址:www.javathinker.org *
***************************************************/
package reflect.sample;
import java.lang.reflect.*;
public class RunDebugTest
{
public static void main(String[] args)
{
try
{
// Create the real interface implementation
TestTarget target = new TestTarget();
// Create a proxy to wrap the original implementation
DebugProxy proxy = new DebugProxy(target);
// Get a reference to the proxy through the TestInterface interface
/* TestInterface test = (TestInterface) Proxy.newProxyInstance(
TestInterface.class.getClassLoader(),
new Class[] { TestInterface.class }, proxy);*/
TestInterface test=target;
// Invoke some methods on the test interface
System.out.println(test.doTest1("This is test ", 1));
test.doTest2(new String[] { "foo", "bar", "baz" });
}
catch (Exception exc)
{
exc.printStackTrace();
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -