01: /**************************************************************************************
02: * Copyright (c) Jonas Bonr, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package org.codehaus.aspectwerkz.intercept;
08:
09: /**
10: * The advisable interface is introduced to target class made advisable.
11: * </p>
12: * Note: user should ensure that the target class has no user defined method named aw_addAdvice
13: * and aw_removeAdvice. Other methods are made synthetic and thus will not lead to name clashes.
14: *
15: * @author <a href="mailto:jboner@codehaus.org">Jonas Bonér </a>
16: */
17: public interface Advisable {
18:
19: /**
20: * @param pointcut
21: * @param advice
22: */
23: void aw_addAdvice(String pointcut, Advice advice);
24:
25: /**
26: * @param pointcut
27: * @param adviceClass
28: */
29: void aw_removeAdvice(String pointcut, Class adviceClass);
30:
31: /**
32: * @param joinPointIndex
33: * @return
34: */
35: AroundAdvice[] aw$getAroundAdvice(final int joinPointIndex);
36:
37: /**
38: * @param joinPointIndex
39: * @return
40: */
41: BeforeAdvice[] aw$getBeforeAdvice(final int joinPointIndex);
42:
43: /**
44: * @param joinPointIndex
45: * @return
46: */
47: AfterAdvice[] aw$getAfterAdvice(final int joinPointIndex);
48:
49: /**
50: * @param joinPointIndex
51: * @return
52: */
53: AfterReturningAdvice[] aw$getAfterReturningAdvice(
54: final int joinPointIndex);
55:
56: /**
57: * @param joinPointIndex
58: * @return
59: */
60: AfterThrowingAdvice[] aw$getAfterThrowingAdvice(
61: final int joinPointIndex);
62: }
|