Package org.aspectj.org.eclipse.jdt.core
Schnittstelle IField
- Alle Superschnittstellen:
org.eclipse.core.runtime.IAdaptable
,IAnnotatable
,IJavaElement
,IMember
,IParent
,ISourceManipulation
,ISourceReference
- Alle bekannten Implementierungsklassen:
AssistSourceField
,ResolvedBinaryField
,ResolvedSourceField
,SourceField
Represents a field declared in a type.
-
Feldübersicht
Von Schnittstelle geerbte Felder org.aspectj.org.eclipse.jdt.core.IJavaElement
ANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_MODULE, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungReturns the constant value associated with this field ornull
if this field has none.Returns the simple name of this field.getKey()
Returns the binding key for this field only if the given field isresolved
.Returns the type signature of this field.boolean
Returns whether this field represents an enum constant.boolean
Returns whether this field represents a record component.boolean
Returns whether this field represents a resolved field.Von Schnittstelle geerbte Methoden org.eclipse.core.runtime.IAdaptable
getAdapter
Von Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IAnnotatable
getAnnotation, getAnnotations
Von Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IJavaElement
exists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getElementType, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnown
Von Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IMember
getCategories, getClassFile, getCompilationUnit, getDeclaringType, getFlags, getJavadocRange, getOccurrenceCount, getType, getTypeRoot, isBinary
Von Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IParent
getChildren, hasChildren
Von Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.ISourceManipulation
copy, delete, move, rename
Von Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.ISourceReference
exists, getNameRange, getSource, getSourceRange
-
Methodendetails
-
getConstant
Returns the constant value associated with this field ornull
if this field has none. To have a constant value, the field needs to be final and initialized with a compile-time constant expression.For types from source, this currently only works if the field initializer is a literal (returns
null
for more complex constant expressions).For primitive types, returns the boxed value.
- Gibt zurück:
- the constant value associated with this field, or
null
if not available - Löst aus:
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.- Angegeben von:
getElementName
in SchnittstelleIJavaElement
- Gibt zurück:
- the simple name of this field.
-
getKey
String getKey()Returns the binding key for this field only if the given field isresolved
. A binding key is a key that uniquely identifies this field. It allows access to generic info for parameterized fields.If the given field is not resolved, the returned key is simply the java element's key.
- Gibt zurück:
- the binding key for this field
- Seit:
- 3.1
- Siehe auch:
-
getTypeSignature
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.- Gibt zurück:
- the type signature of this field
- Löst aus:
JavaModelException
- if this element does not exist or if an exception occurs while accessing its corresponding resource- Siehe auch:
-
isEnumConstant
Returns whether this field represents an enum constant.- Gibt zurück:
- whether this field represents an enum constant
- Löst aus:
JavaModelException
- if this element does not exist or if an exception occurs while accessing its corresponding resource- Seit:
- 3.1
-
isResolved
boolean isResolved()Returns whether this field represents a resolved field. If a field is resolved, its key contains resolved information.- Gibt zurück:
- whether this field represents a resolved field.
- Seit:
- 3.1
-
isRecordComponent
Returns whether this field represents a record component.- Gibt zurück:
- whether this field represents a record component.
- Löst aus:
JavaModelException
- Seit:
- 3.26
-