01: /**************************************************************************************
02: * Copyright (c) Jonas Bonér, Alexandre Vasseur. All rights reserved. *
03: * http://aspectwerkz.codehaus.org *
04: * ---------------------------------------------------------------------------------- *
05: * The software in this package is published under the terms of the LGPL license *
06: * a copy of which has been included with this distribution in the license.txt file. *
07: **************************************************************************************/package org.codehaus.aspectwerkz.joinpoint.impl;
08:
09: import org.codehaus.aspectwerkz.joinpoint.Signature;
10: import org.codehaus.aspectwerkz.transform.TransformationConstants;
11:
12: import java.lang.reflect.Modifier;
13:
14: /**
15: * The class static initializer signature
16: *
17: * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
18: */
19: public class StaticInitializerSignatureImpl implements Signature {
20:
21: private final static int CLINIT_MODIFIERS = Modifier.STATIC;//TODO whatelse
22:
23: private final Class m_declaringType;
24:
25: public StaticInitializerSignatureImpl(Class declaringType) {
26: m_declaringType = declaringType;
27: }
28:
29: public Class getDeclaringType() {
30: return m_declaringType;
31: }
32:
33: public int getModifiers() {
34: return CLINIT_MODIFIERS;
35: }
36:
37: public String getName() {
38: return TransformationConstants.CLINIT_METHOD_NAME;
39: }
40:
41: public String toString() {
42: StringBuffer sb = new StringBuffer();
43: sb.append(m_declaringType.getName());
44: sb.append('.');
45: sb.append(TransformationConstants.CLINIT_METHOD_NAME);
46: return sb.toString();
47: }
48: }
|