new version with WorkingCopy Management
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / SourceFieldElementInfo.java
1 /*******************************************************************************
2  * Copyright (c) 2000, 2003 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials 
4  * are made available under the terms of the Common Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/cpl-v10.html
7  * 
8  * Contributors:
9  *     IBM Corporation - initial API and implementation
10  *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
12
13 import net.sourceforge.phpdt.core.Signature;
14 import net.sourceforge.phpdt.internal.compiler.env.ISourceField;
15
16 /**
17  * Element info for IField elements.
18  */
19
20 /* package */ class SourceFieldElementInfo extends MemberElementInfo implements ISourceField {
21
22         /**
23          * The type name of this field.
24          */
25         protected char[] typeName;
26         
27         /**
28          * The field's initializer string (if the field is a constant).
29          */
30         protected char[] initializationSource;
31
32 /*
33  * Returns the initialization source for this field.
34  * Returns null if the field is not a constant or if it has no initialization.
35  */
36 public char[] getInitializationSource() {
37         return this.initializationSource;
38 }
39 /**
40  * Returns the type name of the field.
41  */
42 public char[] getTypeName() {
43         return this.typeName;
44 }
45 /**
46  * Returns the type signature of the field.
47  *
48  * @see Signature
49  */
50 protected String getTypeSignature() {
51         return Signature.createTypeSignature(this.typeName, false);
52 }
53
54 /**
55  * Sets the type name of the field.
56  */
57 protected void setTypeName(char[] typeName) {
58         this.typeName = typeName;
59 }
60 }