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.core;
14 * Represents a field declared in a type.
16 * This interface is not intended to be implemented by clients.
19 public interface IField extends IMember {
21 * Returns the constant value associated with this field or
22 * <code>null</code> if this field has none. Returns either a subclass of
23 * <code>Number</code>, or a <code>String</code>, depending on the
24 * type of the field. For example, if the field is of type
25 * <code>short</code>, this returns a <code>Short</code>.
27 * @return the constant value associated with this field or
28 * <code>null</code> if this field has none.
29 * @exception JavaModelException
30 * if this element does not exist or if an exception occurs
31 * while accessing its corresponding resource
33 public Object getConstant() throws JavaModelException;
36 * Returns the simple name of this field.
38 * @return the simple name of this field.
40 String getElementName();
43 * Returns the type signature of this field.
46 * @return the type signature of this field.
47 * @exception JavaModelException
48 * if this element does not exist or if an exception occurs
49 * while accessing its corresponding resource
51 String getTypeSignature() throws JavaModelException;