KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > aspectwerkz > transform > aspectj > AdviceInfo


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.transform.aspectj;
9
10 import org.codehaus.aspectwerkz.aspect.AdviceType;
11
12 /**
13  * Struct for the AspectJ advice metadata.
14  *
15  * @author <a HREF="mailto:jboner@codehaus.org">Jonas BonŽr </a>
16  * @TODO should be immutable
17  */

18 class AdviceInfo {
19     AdviceType type;
20     String JavaDoc aspectClassName;
21     String JavaDoc adviceMethodName;
22     String JavaDoc pointcut;
23     int extraParameterFlags;
24     String JavaDoc[] parameterTypes = new String JavaDoc[0];
25
26     public String JavaDoc toString() {
27         StringBuffer JavaDoc stringRepr = new StringBuffer JavaDoc().
28                 append('[').append(type).
29                 append(',').append(aspectClassName).
30                 append(',').append(adviceMethodName).
31                 append(',').append(pointcut).
32                 append(',').append(extraParameterFlags);
33         for (int i = 0; i < parameterTypes.length; i++) {
34             stringRepr.append(',').append(parameterTypes[i]);
35         }
36         stringRepr.append(']');
37         return stringRepr.toString();
38     }
39 }
40
Popular Tags