⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rundebugtest.java

📁 此为java开发方面的算法
💻 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 + -