View Javadoc

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