public interface SmartPsiElementPointer<E extends PsiElement> extends Pointer<E>
Modifier and Type | Method and Description |
---|---|
default E |
dereference() |
PsiFile |
getContainingFile() |
E |
getElement()
Returns the PSI element corresponding to the one from which the smart pointer was created in the
current state of the PSI file.
|
Project |
getProject() |
Segment |
getPsiRange() |
Segment |
getRange() |
VirtualFile |
getVirtualFile() |
equals, hardPointer, hashCode
E getElement()
default E dereference()
dereference
in interface Pointer<E extends PsiElement>
null
if the value was invalidated or cannot be restoredPsiFile getContainingFile()
Project getProject()
VirtualFile getVirtualFile()
Segment getRange()
getPsiRange()
, for non-committed documents
the ranges may be changed (like in RangeMarker
) or even invalidated. In the latter case returns null.
Returns null for invalid pointers.Segment getPsiRange()
getRange()
result when the document has been changed since commit.
Returns null for invalid pointers.