KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > aspectj > runtime > reflect > CodeSignatureImpl


1 /* *******************************************************************
2  * Copyright (c) 1999-2001 Xerox Corporation,
3  * 2002 Palo Alto Research Center, Incorporated (PARC).
4  * All rights reserved.
5  * This program and the accompanying materials are made available
6  * under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * Xerox/PARC initial implementation
12  * ******************************************************************/

13
14
15 package org.aspectj.runtime.reflect;
16
17 import org.aspectj.lang.reflect.CodeSignature;
18
19 abstract class CodeSignatureImpl extends MemberSignatureImpl implements CodeSignature {
20     Class JavaDoc[] parameterTypes;
21     String JavaDoc[] parameterNames;
22     Class JavaDoc[] exceptionTypes;
23     
24     CodeSignatureImpl(int modifiers, String JavaDoc name, Class JavaDoc declaringType,
25         Class JavaDoc[] parameterTypes, String JavaDoc[] parameterNames, Class JavaDoc[] exceptionTypes)
26     {
27         super(modifiers, name, declaringType);
28         this.parameterTypes = parameterTypes;
29         this.parameterNames = parameterNames;
30         this.exceptionTypes = exceptionTypes;
31     }
32     CodeSignatureImpl(String JavaDoc stringRep) {
33         super(stringRep);
34     }
35     
36     public Class JavaDoc[] getParameterTypes() {
37         if (parameterTypes == null) parameterTypes = extractTypes(3);
38         return parameterTypes;
39     }
40     public String JavaDoc[] getParameterNames() {
41         if (parameterNames == null) parameterNames = extractStrings(4);
42         return parameterNames;
43     }
44     public Class JavaDoc[] getExceptionTypes() {
45         if (exceptionTypes == null) exceptionTypes = extractTypes(5);
46         return exceptionTypes;
47     }
48 }
49
Popular Tags