KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > internal > compiler > env > ClassSignature


1 /*******************************************************************************
2  * Copyright (c) 2005, 2007 BEA Systems, Inc.
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  * tyeung@bea.com - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.internal.compiler.env;
12
13 /**
14  * Represents a class reference in the class file.
15  * One of the possible results for the default value of an annotation method or an element value pair.
16  */

17 public class ClassSignature {
18
19     char[] className;
20
21 public ClassSignature(final char[] className) {
22     this.className = className;
23 }
24
25 /**
26  * @return name of the type in the class file format
27  */

28 public char[] getTypeName() {
29     return this.className;
30 }
31
32 public String JavaDoc toString() {
33     StringBuffer JavaDoc buffer = new StringBuffer JavaDoc();
34     buffer.append(this.className);
35     buffer.append(".class"); //$NON-NLS-1$
36
return buffer.toString();
37 }
38 }
Popular Tags