KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*******************************************************************************
2  * Copyright (c) 2006 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * Andy Clement - initial implementation
10  *******************************************************************************/

11
12
13 package org.aspectj.runtime.reflect;
14
15 import java.lang.reflect.Modifier JavaDoc;
16
17 import org.aspectj.lang.reflect.LockSignature;
18
19 class LockSignatureImpl extends SignatureImpl implements LockSignature {
20     private Class JavaDoc parameterType;
21     
22     LockSignatureImpl(Class JavaDoc c) {
23         super(Modifier.STATIC, "lock", c);
24         parameterType = c;
25     }
26     
27     LockSignatureImpl(String JavaDoc stringRep) {
28         super(stringRep);
29     }
30     
31     protected String JavaDoc createToString(StringMaker sm) {
32         if (parameterType == null) parameterType = extractType(3);
33         return "lock("+sm.makeTypeName(parameterType)+")";
34     }
35
36     public Class JavaDoc getParameterType() {
37         if (parameterType == null) parameterType = extractType(3);
38         return parameterType;
39     }
40     
41 }
42
Popular Tags