public class PsiNameValuePairImpl extends JavaStubPsiElement<PsiNameValuePairStub> implements PsiNameValuePair
Iconable.IconFlags, Iconable.LastComputedIcon
CREATION_TRACE, ourTraceStubAstBinding
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 |
---|
PsiNameValuePairImpl(ASTNode node) |
PsiNameValuePairImpl(PsiNameValuePairStub stub) |
Modifier and Type | Method and Description |
---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
PsiAnnotationMemberValue |
getDetachedValue() |
java.lang.String |
getLiteralValue() |
java.lang.String |
getName()
Returns the name of the element.
|
PsiIdentifier |
getNameIdentifier()
Returns the identifier specifying the name of the element.
|
NameValuePairElement |
getNode()
Ensures this element is AST-based.
|
PsiReference |
getReference()
Returns the reference from this PSI element to another PSI element (or elements), if one exists.
|
PsiAnnotationMemberValue |
getValue()
Returns the value for the element.
|
PsiAnnotationMemberValue |
setValue(PsiAnnotationMemberValue newValue) |
void |
subtreeChanged() |
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, calcTreeElement, checkAdd, clone, cloneImpl, delete, deleteChildRange, getChildren, getLanguage, getTextOffset, replace
getContainingFile, getContext, getElementType, getGreenStub, getManager, getParent, getParentByStub, getParentByTree, getProject, getRequiredStubOrPsiChild, getStub, getStubOrPsiChild, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiParentOfType, isPhysical, isValid, isWritable, setNode, setSubstrateRef
addInternal, addRange, addRangeAfter, addRangeBefore, checkDelete, copy, deleteChildInternal, findChildByFilter, findChildByType, findChildByType, findChildrenByType, findChildrenByType, findChildrenByType, findChildrenByType, findElementAt, findLastChildByType, findNotNullChildByType, findNotNullChildByType, getCopyableUserData, getFirstChild, getLastChild, getNextSibling, getPrevSibling, getStartOffsetInParent, getText, getTextLength, getTextRange, putCopyableUserData, replaceChildInternal, textContains, textMatches, textToCharArray
canNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getNavigationElement, getOriginalElement, getPresentation, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textMatches
buildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlags
changeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putUserData, putUserDataIfAbsent, replace, setUserMap
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getAttributeName, getAttributeValue
acceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
getElementType, getStub
public PsiNameValuePairImpl(PsiNameValuePairStub stub)
public PsiNameValuePairImpl(ASTNode node)
public NameValuePairElement getNode()
StubBasedPsiElementBase
getNode
in interface PsiElement
getNode
in class StubBasedPsiElementBase<PsiNameValuePairStub>
StubBasedPsiElementBase.getStub()
will return null.public java.lang.String getName()
PsiNameValuePair
getName
in interface NavigationItem
getName
in interface PsiNameValuePair
getName
in class PsiElementBase
public java.lang.String getLiteralValue()
getLiteralValue
in interface PsiNameValuePair
public PsiIdentifier getNameIdentifier()
PsiNameValuePair
getNameIdentifier
in interface PsiNameValuePair
public PsiAnnotationMemberValue getValue()
PsiNameValuePair
getValue
in interface PsiNameValuePair
public PsiAnnotationMemberValue setValue(PsiAnnotationMemberValue newValue)
setValue
in interface PsiNameValuePair
public PsiAnnotationMemberValue getDetachedValue()
getDetachedValue
in interface PsiNameValuePair
PsiNameValuePair.getValue()
is that this method
avoids expensive AST loading (see StubBasedPsiElementBase
doc).
The downside is that the result might not be in the same tree as the parent, might be non-physical and so
should only be used for read operations.public void subtreeChanged()
subtreeChanged
in class ASTDelegatePsiElement
public PsiReference getReference()
PsiElement
PsiElement.getReferences()
for an example), returns the first associated reference.getReference
in interface PsiElement
getReference
in class PsiElementBase
ReferencesSearch
public final void accept(PsiElementVisitor visitor)
PsiElement
accept
in interface PsiElement
accept
in class PsiElementBase
visitor
- the visitor to pass the element to.public java.lang.String toString()
PsiElement
toString
in interface PsiElement
toString
in class java.lang.Object