Eclipse JDT
2.0

org.eclipse.jdt.core
Interface IField

All Superinterfaces:
IAdaptable, IJavaElement, IMember, ISourceManipulation, ISourceReference

public interface IField
extends IMember

Represents a field declared in a type.

This interface is not intended to be implemented by clients.


Field Summary
 
Fields inherited from interface org.eclipse.jdt.core.IJavaElement
CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE
 
Method Summary
 Object getConstant()
          Returns the constant value associated with this field or null if this field has none.
 String getElementName()
          Returns the simple name of this field.
 String getTypeSignature()
          Returns the type signature of this field.
 
Methods inherited from interface org.eclipse.jdt.core.IMember
getClassFile, getCompilationUnit, getDeclaringType, getFlags, getNameRange, isBinary
 
Methods inherited from interface org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getCorrespondingResource, getElementType, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getResource, getUnderlyingResource, isReadOnly, isStructureKnown
 
Methods inherited from interface org.eclipse.core.runtime.IAdaptable
getAdapter
 
Methods inherited from interface org.eclipse.jdt.core.ISourceReference
exists, getSource, getSourceRange
 
Methods inherited from interface org.eclipse.jdt.core.ISourceManipulation
copy, delete, move, rename
 

Method Detail

getConstant

public Object getConstant()
                   throws JavaModelException
Returns the constant value associated with this field or null if this field has none. Returns either a subclass of Number, or a String, depending on the type of the field. For example, if the field is of type short, this returns a Short.

Returns:
the constant value associated with this field or null if this field has none.
Throws:
JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource

getElementName

public String getElementName()
Returns the simple name of this field.

Specified by:
getElementName in interface IJavaElement
Returns:
the simple name of this field.

getTypeSignature

public String getTypeSignature()
                        throws JavaModelException
Returns the type signature of this field.

Returns:
the type signature of this field.
Throws:
JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource
See Also:
Signature

Eclipse JDT
2.0

Copyright (c) IBM Corp. and others 2000, 2002. All Rights Reserved.