Package run

Source Code of run.Runner

package run;

import java.lang.reflect.Proxy;

import test.ITargetObject;
import test.TargetObject;
import test.proxy.TargetObjectProxy;


public class Runner
{


  public static void main(String[] args)
  {
    TargetObject obj = new TargetObject();
   
    ITargetObject targObject = (ITargetObject)Proxy.newProxyInstance(TargetObject.class.getClassLoader(),
        new Class<?>[]{ITargetObject.class}, new TargetObjectProxy<TargetObject>(obj));
    targObject.boringMethod();
  }

}
TOP

Related Classes of run.Runner

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.