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
9 * IBM Corporation - initial API and implementation
10 *******************************************************************************/
11 package net.sourceforge.phpdt.internal.core;
13 import net.sourceforge.phpdt.core.Signature;
14 import net.sourceforge.phpdt.internal.compiler.env.ISourceField;
17 * Element info for IField elements.
20 /* package */ class SourceFieldElementInfo extends MemberElementInfo implements ISourceField {
23 * The type name of this field.
25 protected char[] typeName;
28 * The field's initializer string (if the field is a constant).
30 protected char[] initializationSource;
33 * Returns the initialization source for this field.
34 * Returns null if the field is not a constant or if it has no initialization.
36 public char[] getInitializationSource() {
37 return this.initializationSource;
40 * Returns the type name of the field.
42 public char[] getTypeName() {
46 * Returns the type signature of the field.
50 protected String getTypeSignature() {
51 return Signature.createTypeSignature(this.typeName, false);
55 * Sets the type name of the field.
57 protected void setTypeName(char[] typeName) {
58 this.typeName = typeName;