com.intellij.psi
Interface PsiJavaCodeReferenceElement

All Superinterfaces:
Iconable, PsiElement, PsiJavaReference, PsiPolyVariantReference, PsiReference, UserDataHolder
All Known Subinterfaces:
PsiImportStaticReferenceElement, PsiReferenceExpression

public interface PsiJavaCodeReferenceElement
extends PsiElement, PsiJavaReference

Represents a reference found in Java code (either an identifier or a sequence of identifiers separated by periods, optionally with generic type arguments).


Field Summary
static PsiJavaCodeReferenceElement[] EMPTY_ARRAY
          The empty array of PSI Java code references which can be reused to avoid unnecessary allocations.
 
Fields inherited from interface com.intellij.openapi.util.Iconable
ICON_FLAG_CLOSED, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
 
Method Summary
 PsiReferenceParameterList getParameterList()
          Returns the list of type arguments specified on the reference.
 java.lang.String getQualifiedName()
          Returns the text of the reference including its qualifier.
 PsiElement getQualifier()
          Returns the qualifier of the reference (the element representing the content up to the last period).
 java.lang.String getReferenceName()
          Returns the text of the reference not including its qualifier.
 PsiElement getReferenceNameElement()
          Returns the element representing the name of the referenced element.
 PsiType[] getTypeParameters()
          Returns the array of types for the type arguments specified on the reference.
 boolean isQualified()
          Checks if the reference is qualified (consists of elements separated with periods).
 
Methods inherited from interface com.intellij.psi.PsiElement
accept, 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, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getUseScope, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
 
Methods inherited from interface com.intellij.openapi.util.UserDataHolder
getUserData, putUserData
 
Methods inherited from interface com.intellij.openapi.util.Iconable
getIcon
 
Methods inherited from interface com.intellij.psi.PsiJavaReference
advancedResolve, multiResolve, processVariants
 
Methods inherited from interface com.intellij.psi.PsiReference
bindToElement, getCanonicalText, getElement, getRangeInElement, getVariants, handleElementRename, isReferenceTo, isSoft, resolve
 

Field Detail

EMPTY_ARRAY

static final PsiJavaCodeReferenceElement[] EMPTY_ARRAY
The empty array of PSI Java code references which can be reused to avoid unnecessary allocations.

Method Detail

getReferenceNameElement

@Nullable
PsiElement getReferenceNameElement()
Returns the element representing the name of the referenced element.

Returns:
the element, or null if the reference element is not physical (for example, exists in compiled code).

getParameterList

@Nullable
PsiReferenceParameterList getParameterList()
Returns the list of type arguments specified on the reference.

Returns:
the type argument list, or null if the reference does not have any type arguments.

getTypeParameters

@NotNull
PsiType[] getTypeParameters()
Returns the array of types for the type arguments specified on the reference.

Returns:
the array of types, or an empty array if the reference does not have any type arguments.

getQualifier

@Nullable
PsiElement getQualifier()
Returns the qualifier of the reference (the element representing the content up to the last period).

Returns:
the qualifier, or null if the reference is not qualified.

isQualified

boolean isQualified()
Checks if the reference is qualified (consists of elements separated with periods).

Returns:
true if the reference is qualified, false otherwise.

getQualifiedName

java.lang.String getQualifiedName()
Returns the text of the reference including its qualifier.

Returns:
the qualified text of the reference.

getReferenceName

@Nullable
java.lang.String getReferenceName()
Returns the text of the reference not including its qualifier.

Returns:
the non-qualified text of the reference, or null if the reference element is incomplete.