001: /**************************************************************************************
002: * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved. *
003: * http://aspectwerkz.codehaus.org *
004: * ---------------------------------------------------------------------------------- *
005: * The software in this package is published under the terms of the LGPL license *
006: * a copy of which has been included with this distribution in the license.txt file. *
007: **************************************************************************************/package org.codehaus.aspectwerkz.joinpoint;
008:
009: import org.codehaus.aspectwerkz.joinpoint.management.JoinPointType;
010:
011: /**
012: * Implements the join point concept, e.g. defines a well defined point in the program flow.
013: * <p/>
014: * Provides access to only static data, is therefore much more performant than the usage of the {@link
015: * org.codehaus.aspectwerkz.joinpoint.JoinPoint} interface.
016: *
017: * @author <a href="mailto:jboner@codehaus.org">Jonas BonŽr </a>
018: */
019: public interface StaticJoinPoint {
020: public static final String METHOD_EXECUTION = "METHOD_EXECUTION";
021: public static final String METHOD_CALL = "METHOD_CALL";
022: public static final String CONSTRUCTOR_EXECUTION = "CONSTRUCTOR_EXECUTION";
023: public static final String CONSTRUCTOR_CALL = "CONSTRUCTOR_CALL";
024: public static final String FIELD_SET = "FIELD_SET";
025: public static final String FIELD_GET = "FIELD_GET";
026: public static final String HANDLER = "HANDLER";
027: public static final String STATIC_INITIALIZATION = "STATIC_INITIALIZATION";
028:
029: /**
030: * Walks through the pointcuts and invokes all its advices. When the last advice of the last pointcut has been
031: * invoked, the original method is invoked. Is called recursively.
032: *
033: * @return the result from the next invocation
034: * @throws Throwable
035: */
036: Object proceed() throws Throwable;
037:
038: /**
039: * Creates a copy of the join point instance.
040: *
041: * @return a copy of the join point instance
042: */
043: StaticJoinPoint copy();
044:
045: /**
046: * Returns metadata matchingn a specfic key.
047: *
048: * @param key the key to the metadata
049: * @return the value
050: */
051: Object getMetaData(Object key);
052:
053: /**
054: * Adds metadata.
055: *
056: * @param key the key to the metadata
057: * @param value the value
058: */
059: void addMetaData(Object key, Object value);
060:
061: /**
062: * Returns the signature for the join point.
063: *
064: * @return the signature
065: */
066: Signature getSignature();
067:
068: /**
069: * Returns the caller class.
070: *
071: * @return the caller class
072: */
073: Class getCallerClass();
074:
075: /**
076: * Returns the callee class.
077: *
078: * @return the target class
079: */
080: Class getCalleeClass();
081:
082: /**
083: * Returns the callee class.
084: *
085: * @return the target class
086: * @deprecated use getCalleeClass() instead
087: */
088: Class getTargetClass();
089:
090: /**
091: * Returns the join point type.
092: *
093: * @return the type
094: */
095: JoinPointType getType();
096:
097: /**
098: * Returns the enclosing static joinpoint.
099: *
100: * @return the enclosing static joinpoint
101: */
102: EnclosingStaticJoinPoint getEnclosingStaticJoinPoint();
103: }
|