View Javadoc

    1   /***************************************************************************************
    2    * Copyright (c) Jonas BonŽr, 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.joinpoint;
    9
    10  import org.codehaus.aspectwerkz.joinpoint.management.JoinPointType;
    11
    12  /***
    13   * Implements the join point concept, e.g. defines a well defined point in the program flow.
    14   * <p/>
    15   * Provides access to only static data, is therefore much more performant than the usage of the {@link
    16   * org.codehaus.aspectwerkz.joinpoint.JoinPoint} interface.
    17   *
    18   * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
    19   */
    20  public interface StaticJoinPoint {
    21      public static final String METHOD_EXECUTION = "METHOD_EXECUTION";
    22      public static final String METHOD_CALL = "METHOD_CALL";
    23      public static final String CONSTRUCTOR_EXECUTION = "CONSTRUCTOR_EXECUTION";
    24      public static final String CONSTRUCTOR_CALL = "CONSTRUCTOR_CALL";
    25      public static final String FIELD_SET = "FIELD_SET";
    26      public static final String FIELD_GET = "FIELD_GET";
    27      public static final String HANDLER = "HANDLER";
    28      public static final String STATIC_INITIALIZATION = "STATIC_INITIALIZATION";
    29
    30      /***
    31       * Walks through the pointcuts and invokes all its advices. When the last advice of the last pointcut has been
    32       * invoked, the original method is invoked. Is called recursively.
    33       *
    34       * @return the result from the next invocation
    35       * @throws Throwable
    36       */
    37      Object proceed() throws Throwable;
    38
    39      /***
    40       * Creates a copy of the join point instance.
    41       *
    42       * @return a copy of the join point instance
    43       */
    44      StaticJoinPoint copy();
    45
    46      /***
    47       * Returns metadata matchingn a specfic key.
    48       *
    49       * @param key the key to the metadata
    50       * @return the value
    51       */
    52      Object getMetaData(Object key);
    53
    54      /***
    55       * Adds metadata.
    56       *
    57       * @param key   the key to the metadata
    58       * @param value the value
    59       */
    60      void addMetaData(Object key, Object value);
    61
    62      /***
    63       * Returns the signature for the join point.
    64       *
    65       * @return the signature
    66       */
    67      Signature getSignature();
    68
    69      /***
    70       * Returns the caller class.
    71       *
    72       * @return the caller class
    73       */
    74      Class getCallerClass();
    75
    76      /***
    77       * Returns the callee class.
    78       *
    79       * @return the target class
    80       */
    81      Class getCalleeClass();
    82
    83      /***
    84       * Returns the callee class.
    85       *
    86       * @return the target class
    87       * @deprecated use getCalleeClass() instead
    88       */
    89      Class getTargetClass();
    90
    91      /***
    92       * Returns the join point type.
    93       *
    94       * @return the type
    95       */
    96      JoinPointType getType();
    97
    98      /***
    99       * Returns the enclosing static joinpoint.
    100      *
    101      * @return the enclosing static joinpoint
    102      */
    103     EnclosingStaticJoinPoint getEnclosingStaticJoinPoint();
    104 }