public class PsiTypeElementImpl extends CompositePsiElement implements PsiTypeElement
Iconable.IconFlags, Iconable.LastComputedIconourHCEMPTY_ARRAYFLAGS_LOCKED, ICON_PLACEHOLDERARRAY_FACTORY, EMPTY_ARRAYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_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, navigateacceptTree, 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, textToCharArraycopyElement, equals, getElementType, getManager, getStartOffset, getStartOffsetInParent, getTextOffset, getTextRange, getTreeNext, getTreeParent, getTreePrev, invalidate, onInvalidated, rawInsertAfterMe, rawInsertBeforeMe, rawRemove, rawRemoveUpTo, rawRemoveUpToLast, rawReplaceWithList, textMatches, textMatches, textMatchesbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlagschangeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, putUserData, putUserDataIfAbsent, replace, setUserMapfinalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptChildren, 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, textToCharArraygetUserData, putUserDatahasAnnotationgetCopyableUserData, putCopyableUserDatapublic void accept(PsiElementVisitor visitor)
PsiElementaccept in interface PsiElementaccept in class CompositePsiElementvisitor - the visitor to pass the element to.public PsiType getType()
PsiTypeElementNote: 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 PsiTypeElementPsiField.getType(),
PsiMethod.getReturnType(),
PsiParameter.getType(),
PsiVariable.getType()public boolean isInferredType()
PsiTypeElementtrue 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 PsiTypeElementpublic PsiJavaCodeReferenceElement getInnermostComponentReferenceElement()
PsiTypeElementgetInnermostComponentReferenceElement in interface PsiTypeElementpublic boolean processDeclarations(PsiScopeProcessor processor, ResolveState state, PsiElement lastParent, PsiElement place)
PsiElementprocessDeclarations in interface PsiElementprocessDeclarations in class CompositePsiElementprocessor - 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()
PsiAnnotationOwnergetAnnotations in interface PsiAnnotationOwnerpublic PsiAnnotation [] getApplicableAnnotations()
getApplicableAnnotations in interface PsiAnnotationOwnerpublic PsiAnnotation findAnnotation(java.lang.String qualifiedName)
PsiAnnotationOwnerfindAnnotation in interface PsiAnnotationOwnerqualifiedName - the fully qualified name of the annotation to find.public PsiAnnotation addAnnotation(java.lang.String qualifiedName)
PsiAnnotationOwneraddAnnotation in interface PsiAnnotationOwnerqualifiedName - qualifiedNamepublic PsiElement replace(PsiElement newElement) throws IncorrectOperationException
PsiElementreplace in interface PsiElementreplace in class CompositePsiElementnewElement - 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()
PsiElementtoString in interface PsiElementtoString in class CompositePsiElement