public class PsiTypeElementImpl extends CompositePsiElement implements PsiTypeElement
Iconable.IconFlags, Iconable.LastComputedIcon
ourHC
EMPTY_ARRAY
FLAGS_LOCKED, ICON_PLACEHOLDER
ARRAY_FACTORY, EMPTY_ARRAY
ICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY
EMPTY_NAVIGATION_ITEM_ARRAY
Constructor and Description |
---|
PsiTypeElementImpl() |
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.
|
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.
|
PsiType |
getType()
Returns the type referenced by the type element.
|
boolean |
isInferredType()
Returns
true when a variable is declared as var name;
The actual type should be inferred according to the JEP 286: Local-Variable Type Inference
(http://openjdk.java.net/jeps/286). |
boolean |
processDeclarations(PsiScopeProcessor processor,
ResolveState state,
PsiElement lastParent,
PsiElement place)
Passes the declarations contained in this PSI element and its children
for processing to the specified scope processor.
|
PsiElement |
replace(PsiElement newElement)
Replaces this PSI element (along with all its children) with another element
(along with the children).
|
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, checkAdd, checkDelete, clone, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getFirstChild, getLanguage, getLastChild, getName, getNavigationElement, getNextSibling, getNode, getOriginalElement, getParent, getPresentation, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, navigate
acceptTree, addChild, addChild, addChildren, addInternal, addLeaf, clearCaches, countChildren, createPsiNoLock, deleteChildInternal, findChildByRole, findChildByRoleAsPsiElement, findChildByType, findChildByType, findChildByType, findChildByType, findLeafElementAt, findPsiChildByType, findPsiChildByType, getCachedLength, getChars, getChildren, getChildrenAsPsiElements, getChildrenAsPsiElements, getChildRole, getChildRole, getFirstChildNode, getLastChildNode, getPsi, getPsi, getText, getTextLength, hc, rawAddChildren, rawAddChildrenWithoutNotifications, rawFirstChild, rawLastChild, rawRemoveAllChildren, removeAllChildren, removeChild, removeRange, replaceAllChildrenToChildrenOf, replaceChild, replaceChildInternal, setPsi, subtreeChanged, textContains, textMatches, textToCharArray
copyElement, equals, getElementType, getManager, getStartOffset, getStartOffsetInParent, getTextOffset, getTextRange, getTreeNext, getTreeParent, getTreePrev, invalidate, onInvalidated, rawInsertAfterMe, rawInsertBeforeMe, rawRemove, rawRemoveUpTo, rawRemoveUpToLast, rawReplaceWithList, textMatches, textMatches, textMatches
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMap
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
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, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, putCopyableUserData, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
hasAnnotation
getCopyableUserData, putCopyableUserData
public void accept(PsiElementVisitor visitor)
PsiElement
accept
in interface PsiElement
accept
in class CompositePsiElement
visitor
- the visitor to pass the element to.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 boolean isInferredType()
PsiTypeElement
true
when a variable is declared as var name;
The actual type should be inferred according to the JEP 286: Local-Variable Type Inference
(http://openjdk.java.net/jeps/286).
Applicable to local variables with initializers, foreach parameters, try-with-resources variablesisInferredType
in interface PsiTypeElement
public PsiJavaCodeReferenceElement getInnermostComponentReferenceElement()
PsiTypeElement
getInnermostComponentReferenceElement
in interface PsiTypeElement
public boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place)
PsiElement
processDeclarations
in interface PsiElement
processDeclarations
in class CompositePsiElement
processor
- the processor receiving the declarations.lastParent
- the child of this element has been processed during the previous
step of the tree up walk (declarations under this element do not need
to be processed again)place
- the original element from which the tree up walk was initiated.public PsiAnnotation [] getAnnotations()
PsiAnnotationOwner
getAnnotations
in interface PsiAnnotationOwner
public PsiAnnotation [] getApplicableAnnotations()
getApplicableAnnotations
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 PsiElement replace(PsiElement newElement) throws IncorrectOperationException
PsiElement
replace
in interface PsiElement
replace
in class CompositePsiElement
newElement
- the element to replace this element with.newElement
or its copy)IncorrectOperationException
- if the modification is not supported or not possible for some reason.public java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class CompositePsiElement