01: package org.mockejb.interceptor;
02:
03: import java.lang.reflect.Method;
04:
05: /**
06: * Represents the AOP "pointcut" abstraction.
07: * Note that AspectSystem matches pointcuts only
08: * against intercepted methods. For example, "find" method of an
09: * Entity interface triggers the call to the ejbFind method of the
10: * entity bean implementation class. Using pointcuts, you can only
11: * match the "find" method and the business interface but not the target
12: * method/object being called in response to the interface call.
13: *
14: * @author Alexander Ananiev
15: */
16: public interface Pointcut {
17:
18: /**
19: * Tests if the provided jointpoint represented by the intercepted object (object being called)
20: * and the method matches this pointcut. In other words, tests if the interceptor
21: * associated with this pointcut needs to be applied to the provided jointpoint.
22: *
23: * @param method method being invoked
24: * @return true if the target object or method match the condition specified in
25: * this pointcut
26: */
27: boolean matchesJointpoint(Method method);
28:
29: }
|