public interface PsiField extends PsiJvmMember, PsiVariable, PsiDocCommentOwner, JvmField
Iconable.IconFlags, Iconable.LastComputedIcon
Modifier and Type | Field and Description |
---|---|
static ArrayFactory<PsiField> |
ARRAY_FACTORY |
static PsiField[] |
EMPTY_ARRAY
The empty array of PSI fields which can be reused to avoid unnecessary allocations.
|
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATION_ITEM_ARRAY
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getName()
Returns the name of the element.
|
PsiIdentifier |
getNameIdentifier()
Returns the identifier declaring the name of the variable.
|
PsiType |
getType()
Returns the type of the variable.
|
void |
setInitializer(PsiExpression initializer)
Adds initializer to the field declaration or, if
initializer parameter is null,
removes the initializer from the field declaration. |
getContainingClass
getAnnotation, getAnnotations, getSourceElement, hasAnnotation, hasModifier
computeConstantValue, getInitializer, getTypeElement, hasInitializer, normalizeDeclaration, setName
getIdentifyingElement
getNavigationElement
isWritable
isDeprecated
accept, acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray, toString
getUserData, putUserData
getPresentation
canNavigate, canNavigateToSource, navigate
getDocComment
static final PsiField[] EMPTY_ARRAY
static final ArrayFactory<PsiField> ARRAY_FACTORY
void setInitializer(PsiExpression initializer) throws IncorrectOperationException
initializer
parameter is null,
removes the initializer from the field declaration.setInitializer
in interface PsiVariable
initializer
- the initializer to add.IncorrectOperationException
- if the modifications fails for some reason.PsiIdentifier getNameIdentifier()
PsiVariable
getNameIdentifier
in interface PsiNameIdentifierOwner
getNameIdentifier
in interface PsiVariable
PsiType getType()
PsiVariable
getType
in interface JvmField
getType
in interface PsiVariable
Field.getGenericType()
,
Field.getAnnotatedType()
java.lang.String getName()
PsiNamedElement
getName
in interface JvmField
getName
in interface JvmMember
getName
in interface JvmNamedElement
getName
in interface NavigationItem
getName
in interface PomNamedTarget
getName
in interface PsiNamedElement
Member.getName()