public interface IField extends IMember
This interface is not intended to be implemented by clients.
CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER| Modifier and Type | Method and Description |
|---|---|
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 |
getKey()
Returns the binding key for this field.
|
String |
getTypeSignature()
Returns the type signature of this field.
|
boolean |
isEnumConstant()
Returns whether this field represents an enum constant.
|
boolean |
isResolved()
Returns whether this field represents a resolved field.
|
getCategories, getClassFile, getCompilationUnit, getDeclaringType, getFlags, getJavadocRange, getNameRange, getOccurrenceCount, getType, isBinaryexists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getElementType, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnowngetAdapterexists, getSource, getSourceRangecopy, delete, move, renamegetChildren, hasChildrenObject getConstant() throws JavaModelException
null if this field has none. The field needs to be static and final to have
a constant value.
Returns an instance of the wrapper type corresponding to the the type of the field.
| field type | wrapper type |
|---|---|
| int | java.lang.Integer |
| byte | java.lang.Byte |
| boolean | java.lang.Boolean |
| char | java.lang.Character |
| double | java.lang.Double |
| float | java.lang.Float |
| long | java.lang.Long |
| short | java.lang.Short |
| java.lang.String | java.lang.String |
null if this field has none.JavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceString getElementName()
getElementName in interface IJavaElementString getKey()
IBinding.getKey(),
BindingKeyString getTypeSignature() throws JavaModelException
The type signature may be either unresolved (for source types)
or resolved (for binary types), and either basic (for basic types)
or rich (for parameterized types). See Signature for details.
JavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceSignatureboolean isEnumConstant()
throws JavaModelException
JavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resourceboolean isResolved()
Copyright (c) IBM Corp. and others 2000, 2006. All Rights Reserved.