KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > aspectwerkz > joinpoint > impl > StaticInitializerSignatureImpl


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.aspectwerkz.joinpoint.impl;
5
6
7 import com.tc.aspectwerkz.joinpoint.Signature;
8 import com.tc.aspectwerkz.transform.TransformationConstants;
9
10 import java.lang.reflect.Modifier JavaDoc;
11
12 /**
13  * The class static initializer signature
14  *
15  * @author <a HREF="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
16  */

17 public class StaticInitializerSignatureImpl implements Signature {
18
19   private final static int CLINIT_MODIFIERS = Modifier.STATIC;//TODO whatelse
20

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