KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > aspectj > lang > reflect > Advice


1 /* *******************************************************************
2  * Copyright (c) 2005 Contributors.
3  * All rights reserved.
4  * This program and the accompanying materials are made available
5  * under the terms of the Eclipse Public License v1.0
6  * which accompanies this distribution and is available at
7  * http://eclipse.org/legal/epl-v10.html
8  *
9  * Contributors:
10  * Adrian Colyer Initial implementation
11  * ******************************************************************/

12 package org.aspectj.lang.reflect;
13
14 import java.lang.reflect.Type JavaDoc;
15
16 /**
17  * Runtime representation of an advice declaration inside an aspect
18  */

19 public interface Advice {
20
21     /**
22      * The declaring aspect
23      */

24     AjType getDeclaringType();
25     
26     /**
27      * The kind of advice (before, after-returning, after-throwing, etc.)
28      */

29     AdviceKind getKind();
30     
31     /**
32      * Returns the advice name, or the empty string if the advice is anonymous.
33      * If using the @AspectJ annotations, the advice name is the name of the
34      * annotated advice method. If using the code style, the advice is
35      * anonymous, unless the advice is annotated with the @AdviceName annotation,
36      * in which case the name given in the annotation is returned.
37      */

38     String JavaDoc getName();
39     
40     /**
41      * The advice parameters
42      */

43     AjType<?>[] getParameterTypes();
44     
45     /**
46      * The generic parameter types, @see java.lang.reflect.Method.getGenericParameterTypes
47      */

48     Type JavaDoc[] getGenericParameterTypes();
49     
50     /**
51      * The declared thrown exceptions by the advice
52      */

53     AjType<?>[] getExceptionTypes();
54     
55     /**
56      * The pointcut expression associated with the advice declaration.
57      */

58     PointcutExpression getPointcutExpression();
59 }
60
Popular Tags