Beispiel #1
0
 private static void testJDKDynamicProxy() {
   Greeting greeting = new JDKDynamicProxy(new GreetingImpl()).getProxy();
   greeting.sayHello("Jack");
 }
Beispiel #2
0
 private static void testCGLibDynamicProxy() {
   Greeting greeting = CGLibDynamicProxy.getInstance().getProxy(GreetingImpl.class);
   greeting.sayHello("Jack");
 }
Beispiel #3
0
 private static void testGreetingProxy() {
   Greeting greetingProxy = new GreetingProxy(new GreetingImpl());
   greetingProxy.sayHello("Jack");
 }