Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 


Eclipse JDT
Release 3.5

org.eclipse.jdt.core
Interface IField

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

public interface IField
extends IMember, IAnnotatable

Represents a field declared in a type.

Restriction:
This interface is not intended to be implemented by clients.

Field Summary
 
Fields inherited from interface org.eclipse.jdt.core. IJavaElement
ANNOTATION, 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
 
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 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.
 
Methods inherited from interface org.eclipse.jdt.core. IMember
getCategories, getClassFile, getCompilationUnit, getDeclaringType, getFlags, getJavadocRange, getNameRange, getOccurrenceCount, getType, getTypeRoot, isBinary
 
Methods inherited from interface org.eclipse.jdt.core. IJavaElement
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getElementType, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, 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
 
Methods inherited from interface org.eclipse.jdt.core. IParent
getChildren, hasChildren
 
Methods inherited from interface org.eclipse.jdt.core. IAnnotatable
getAnnotation, getAnnotations
 

Method Detail

getConstant

Object getConstant()
                   throws 
JavaModelException
Returns the constant value associated with this field or 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

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

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

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

getKey

String getKey()
Returns the binding key for this field. A binding key is a key that uniquely identifies this field. It allows access to generic info for parameterized fields.

Returns:
the binding key for this field
Since:
3.1
See Also:
IBinding.getKey(), BindingKey

getTypeSignature

String getTypeSignature()
                        throws 
JavaModelException
Returns the type signature of this field. For enum constants, this returns the signature of the declaring enum class.

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.

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

isEnumConstant

boolean isEnumConstant()
                       throws 
JavaModelException
Returns whether this field represents an enum constant.

Returns:
whether this field represents an enum constant
Throws:
JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource
Since:
3.1

isResolved

boolean isResolved()
Returns whether this field represents a resolved field. If a field is resolved, its key contains resolved information.

Returns:
whether this field represents a resolved field.
Since:
3.1

Eclipse JDT
Release 3.5

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

 
 
  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire