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 ornullif 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.booleanReturns whether this field represents an enum constant.booleanReturns whether this field represents a record component.booleanReturns whether this field represents a resolved field.Von Schnittstelle geerbte Methoden org.eclipse.core.runtime.IAdaptable
getAdapterVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IAnnotatable
getAnnotation, getAnnotationsVon 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, isStructureKnownVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IMember
getCategories, getClassFile, getCompilationUnit, getDeclaringType, getFlags, getJavadocRange, getOccurrenceCount, getType, getTypeRoot, isBinaryVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.IParent
getChildren, hasChildrenVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.ISourceManipulation
copy, delete, move, renameVon Schnittstelle geerbte Methoden org.aspectj.org.eclipse.jdt.core.ISourceReference
exists, getNameRange, getSource, getSourceRange
-
Methodendetails
-
getConstant
Returns the constant value associated with this field ornullif 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
nullfor more complex constant expressions).For primitive types, returns the boxed value.
- Gibt zurück:
- the constant value associated with this field, or
nullif 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:
getElementNamein 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
Signaturefor 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
-