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_ARRAYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_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. |
getContainingClassgetAnnotation, getAnnotations, getSourceElement, hasAnnotation, hasModifiercomputeConstantValue, getInitializer, getTypeElement, hasInitializer, normalizeDeclaration, setNamegetIdentifyingElementgetNavigationElementisWritableisDeprecatedaccept, 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, toStringgetUserData, putUserDatagetPresentationcanNavigate, canNavigateToSource, navigategetDocCommentstatic 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 PsiVariableinitializer - the initializer to add.IncorrectOperationException - if the modifications fails for some reason.PsiIdentifier getNameIdentifier()
PsiVariablegetNameIdentifier in interface PsiNameIdentifierOwnergetNameIdentifier in interface PsiVariablePsiType getType()
PsiVariablegetType in interface JvmFieldgetType in interface PsiVariableField.getGenericType(),
Field.getAnnotatedType()java.lang.String getName()
PsiNamedElementgetName in interface JvmFieldgetName in interface JvmMembergetName in interface JvmNamedElementgetName in interface NavigationItemgetName in interface PomNamedTargetgetName in interface PsiNamedElementMember.getName()