KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > codehaus > aspectwerkz > joinpoint > impl > StaticInitializerSignatureImpl


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.impl;
9
10 import org.codehaus.aspectwerkz.joinpoint.Signature;
11 import org.codehaus.aspectwerkz.transform.TransformationConstants;
12
13 import java.lang.reflect.Modifier JavaDoc;
14
15 /**
16  * The class static initializer signature
17  *
18  * @author <a HREF="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
19  */

20 public class StaticInitializerSignatureImpl implements Signature {
21
22     private final static int CLINIT_MODIFIERS = Modifier.STATIC;//TODO whatelse
23

24     private final Class JavaDoc m_declaringType;
25
26     public StaticInitializerSignatureImpl(Class JavaDoc declaringType) {
27         m_declaringType = declaringType;
28     }
29
30     public Class JavaDoc getDeclaringType() {
31         return m_declaringType;
32     }
33
34     public int getModifiers() {
35         return CLINIT_MODIFIERS;
36     }
37
38     public String JavaDoc getName() {
39         return TransformationConstants.CLINIT_METHOD_NAME;
40     }
41
42     public String JavaDoc toString() {
43         StringBuffer JavaDoc sb = new StringBuffer JavaDoc();
44         sb.append(m_declaringType.getName());
45         sb.append('.');
46         sb.append(TransformationConstants.CLINIT_METHOD_NAME);
47         return sb.toString();
48     }
49 }
50
Popular Tags