1 package org.neo.swarm.core.aop.silc.comp;
2
3 import java.lang.reflect.InvocationHandler;
4 import java.lang.reflect.Method;
5 import java.io.Serializable;
6
7 import org.neo.swarm.core.aop.AspectComponent;
8
9
10
11 public class AspectInvocationHandler implements InvocationHandler, net.sf.cglib.proxy.InvocationHandler, Serializable {
12 private AspectComponent aspected;
13 private Perspective perspective;
14 private Object key;
15
16 public AspectInvocationHandler(Object key, Perspective perspective, AspectComponent aspected) {
17 this.key = key;
18 this.aspected = aspected;
19 this.perspective = perspective;
20 }
21
22 public Object invoke(Object object, Method method, Object[] objects) throws Throwable {
23 return aspected.invokeMethod(key, perspective, object, method, objects);
24 }
25 }