01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.aspectwerkz.joinpoint.impl;
05:
06: import com.tc.aspectwerkz.joinpoint.Signature;
07: import com.tc.aspectwerkz.transform.TransformationConstants;
08:
09: import java.lang.reflect.Modifier;
10:
11: /**
12: * The class static initializer signature
13: *
14: * @author <a href="mailto:alex AT gnilux DOT com">Alexandre Vasseur</a>
15: */
16: public class StaticInitializerSignatureImpl implements Signature {
17:
18: private final static int CLINIT_MODIFIERS = Modifier.STATIC;//TODO whatelse
19:
20: private final Class m_declaringType;
21:
22: public StaticInitializerSignatureImpl(Class declaringType) {
23: m_declaringType = declaringType;
24: }
25:
26: public Class getDeclaringType() {
27: return m_declaringType;
28: }
29:
30: public int getModifiers() {
31: return CLINIT_MODIFIERS;
32: }
33:
34: public String getName() {
35: return TransformationConstants.CLINIT_METHOD_NAME;
36: }
37:
38: public String toString() {
39: StringBuffer sb = new StringBuffer();
40: sb.append(m_declaringType.getName());
41: sb.append('.');
42: sb.append(TransformationConstants.CLINIT_METHOD_NAME);
43: return sb.toString();
44: }
45: }
|