- All Superinterfaces:
PsiElement
- All Known Subinterfaces:
PsiNameIdentifierOwner
Represents a declaration which introduces a named entity and can be renamed (for example, a class or a method).
References should not implement this interface since they don't usually introduce a new entity.
- See Also:
-
com.intellij.model.psi.PsiSymbolDeclaration
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PsiNamedElement[]The empty array of PSI named elements which can be reused to avoid unnecessary allocations. -
Method Summary
Methods inherited from interface com.intellij.psi.PsiElement
add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getFirstChild, getLanguage, getLastChild, getNavigationElement, getNextSibling, getNode, getOriginalElement, getParent, getPrevSibling, getReference, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, isEquivalentTo, isPhysical, isValid, isWritable, replace, textContains, textMatches, textMatches, textToCharArray, toString
-
Field Details
-
EMPTY_ARRAY
The empty array of PSI named elements which can be reused to avoid unnecessary allocations.
-
-
Method Details
-
getName
Returns the name of the element.- Returns:
- the element name.
-
setName
PsiElement setName(@NlsSafe @NotNull @NlsSafe @NotNull String name) throws IncorrectOperationException Renames the element.- Parameters:
name- the new element name.- Returns:
- the element corresponding to this element after the renaming (either
thisor a different element if the renaming caused the element to be replaced). - Throws:
IncorrectOperationException- if the modification is not supported or not possible for some reason.
-