public abstract class CachingReference extends java.lang.Object implements PsiReference
ARRAY_FACTORY, EMPTY_ARRAY
Constructor and Description |
---|
CachingReference() |
Modifier and Type | Method and Description |
---|---|
static <T extends PsiElement> |
getManipulator(T currentElement) |
boolean |
isReferenceTo(PsiElement element)
Checks if the reference targets the specified element.
|
boolean |
isSoft()
Returns
false if the underlying element is guaranteed to be a reference, or true
if the underlying element is a possible reference which should not be reported as
an error if it fails to resolve. |
PsiElement |
resolve()
Returns the element which is the target of the reference.
|
abstract PsiElement |
resolveInner() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
bindToElement, getCanonicalText, getElement, getRangeInElement, getVariants, handleElementRename, resolveReference, resolvesTo
getAbsoluteRange
public PsiElement resolve()
PsiReference
resolve
in interface PsiReference
null
if it was not possible to resolve the reference to a valid target.PsiPolyVariantReference.multiResolve(boolean)
public abstract PsiElement resolveInner()
public boolean isReferenceTo(PsiElement element)
PsiReference
isReferenceTo
in interface PsiReference
element
- the element to check target for.true
if the reference targets that element, false
otherwise.public boolean isSoft()
PsiReference
false
if the underlying element is guaranteed to be a reference, or true
if the underlying element is a possible reference which should not be reported as
an error if it fails to resolve. For example, a text in an XML file which looks
like a full-qualified Java class name is a soft reference.isSoft
in interface PsiReference
true
if the reference is soft, false
otherwise.public static <T extends PsiElement> ElementManipulator<T> getManipulator(T currentElement)