public class LightTypeElement extends LightElement implements PsiTypeElement
Iconable.IconFlags, Iconable.LastComputedIcon
myManager
FLAGS_LOCKED, ICON_PLACEHOLDER
ARRAY_FACTORY, EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATABLE_ELEMENT_ARRAY
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
LightTypeElement(PsiManager manager,
PsiType type) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
PsiAnnotation |
addAnnotation(java.lang.String qualifiedName)
Adds a new annotation to this owner.
|
PsiElement |
copy()
Creates a copy of the file containing the PSI element and returns the corresponding
element in the created copy.
|
PsiAnnotation |
findAnnotation(java.lang.String qualifiedName)
Searches the owner for an annotation with the specified fully qualified name
and returns one if it is found.
|
PsiAnnotation [] |
getAnnotations()
Returns the list of annotations syntactically contained in the element.
|
PsiAnnotation [] |
getApplicableAnnotations() |
PsiJavaCodeReferenceElement |
getInnermostComponentReferenceElement()
Returns the reference element pointing to the referenced type, or if the type element
is an array, the reference element for the innermost component type of the array.
|
java.lang.String |
getText()
Returns the text of the PSI element.
|
PsiType |
getType()
Returns the type referenced by the type element.
|
boolean |
isValid()
Checks if this PSI element is valid.
|
java.lang.String |
toString()
toString() should never be presented to the user.
|
add, addAfter, addBefore, checkAdd, checkDelete, delete, findElementAt, getChildren, getContainingFile, getLanguage, getManager, getNavigationElement, getNextSibling, getNode, getParent, getPrevSibling, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, isPhysical, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArray
acceptChildren, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getContext, getFirstChild, getLastChild, getName, getOriginalElement, getPresentation, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textContains
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
isInferredType
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
hasAnnotation
public LightTypeElement(PsiManager manager, PsiType type)
public java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class LightElement
public java.lang.String getText()
PsiElement
getText
in interface PsiElement
getText
in class LightElement
PsiElement.textMatches(java.lang.CharSequence)
,
PsiElement.textContains(char)
public void accept(PsiElementVisitor visitor)
PsiElement
accept
in interface PsiElement
accept
in class LightElement
visitor
- the visitor to pass the element to.public PsiElement copy()
PsiElement
copy
in interface PsiElement
copy
in class LightElement
public PsiType getType()
PsiTypeElement
Note: when a containing element (field, method etc.) has C-style array declarations, the result of this method may differ from an actual type.
getType
in interface PsiTypeElement
PsiField.getType()
,
PsiMethod.getReturnType()
,
PsiParameter.getType()
,
PsiVariable.getType()
public PsiJavaCodeReferenceElement getInnermostComponentReferenceElement()
PsiTypeElement
getInnermostComponentReferenceElement
in interface PsiTypeElement
public boolean isValid()
PsiElement
PsiDocumentManager.commitDocument(com.intellij.openapi.editor.Document)
).
(In this case an attempt to change PSI will result in an exception).
Any access to invalid elements results in PsiInvalidElementAccessException
.
Once invalid, elements can't become valid again.
Elements become invalid in following cases:
PsiElement.delete()
)isValid
in interface PsiElement
isValid
in class LightElement
PsiUtilCore.ensureValid(PsiElement)
public PsiAnnotation [] getAnnotations()
PsiAnnotationOwner
getAnnotations
in interface PsiAnnotationOwner
public PsiAnnotation findAnnotation(java.lang.String qualifiedName)
PsiAnnotationOwner
findAnnotation
in interface PsiAnnotationOwner
qualifiedName
- the fully qualified name of the annotation to find.public PsiAnnotation addAnnotation(java.lang.String qualifiedName)
PsiAnnotationOwner
addAnnotation
in interface PsiAnnotationOwner
qualifiedName
- qualifiedNamepublic PsiAnnotation [] getApplicableAnnotations()
getApplicableAnnotations
in interface PsiAnnotationOwner