1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package it.openutils.spring.rmibernate.server.aspects;
18
19 import it.openutils.spring.rmibernate.shared.LazyReference;
20
21 import java.lang.reflect.Method;
22
23 import net.sf.cglib.proxy.MethodInterceptor;
24 import net.sf.cglib.proxy.MethodProxy;
25
26
27
28
29
30
31
32 public class LazyReferenceAspect implements MethodInterceptor
33 {
34
35 private LazyReference lazyReference;
36
37 public LazyReference getLazyReference()
38 {
39 return lazyReference;
40 }
41
42 public void setLazyReference(LazyReference lazyReference)
43 {
44 this.lazyReference = lazyReference;
45 }
46
47
48
49
50 public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable
51 {
52 return lazyReference;
53 }
54
55 }