public abstract class SmartPointerManager
extends java.lang.Object
Constructor and Description |
---|
SmartPointerManager() |
Modifier and Type | Method and Description |
---|---|
<E extends PsiElement> |
createLazyPointer(E element)
Deprecated.
use
createSmartPsiElementPointer(PsiElement) instead |
static <E extends PsiElement> |
createPointer(E element)
Creates a smart pointer to the specified PSI element
using a manager that corresponds to the element's project.
|
abstract <E extends PsiElement> |
createSmartPsiElementPointer(E element)
Creates a smart pointer to the specified PSI element.
|
abstract <E extends PsiElement> |
createSmartPsiElementPointer(E element,
PsiFile containingFile)
Creates a smart pointer to the specified PSI element.
|
abstract SmartPsiFileRange |
createSmartPsiFileRangePointer(PsiFile file,
TextRange range) |
static SmartPointerManager |
getInstance(Project project) |
abstract boolean |
pointToTheSameElement(SmartPsiElementPointer<?> pointer1,
SmartPsiElementPointer<?> pointer2)
This method is cheaper than dereferencing both pointers and comparing the result.
|
abstract void |
removePointer(SmartPsiElementPointer<?> pointer)
Disposes a smart pointer and frees the resources associated with it.
|
public abstract SmartPsiFileRange createSmartPsiFileRangePointer(PsiFile file, TextRange range)
public static SmartPointerManager getInstance(Project project)
public static <E extends PsiElement> SmartPsiElementPointer<E> createPointer(E element)
E
- the specific type of the given elementelement
- the element to create a pointer tocreateSmartPsiElementPointer(PsiElement)
public abstract <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(E element)
createSmartPsiElementPointer(PsiElement, PsiFile)
.element
- the element to create a pointer to.public abstract <E extends PsiElement> SmartPsiElementPointer<E> createSmartPsiElementPointer(E element, PsiFile containingFile)
element
- the element to create a pointer to.containingFile
- the result of element.getContainingFile()
.@Deprecated public <E extends PsiElement> SmartPsiElementPointer<E> createLazyPointer(E element)
createSmartPsiElementPointer(PsiElement)
insteadelement
- the element to create a pointer to.public abstract boolean pointToTheSameElement(SmartPsiElementPointer<?> pointer1, SmartPsiElementPointer<?> pointer2)
pointer1
- smart pointer to comparepointer2
- smart pointer to comparepublic abstract void removePointer(SmartPsiElementPointer<?> pointer)