public class PsiLiteralExpressionImpl extends JavaStubPsiElement<PsiLiteralStub> implements PsiLiteralExpression, PsiLanguageInjectionHost, ContributedReferenceHost
Iconable.IconFlags, Iconable.LastComputedIconPsiLanguageInjectionHost.InjectedPsiVisitor, PsiLanguageInjectionHost.ShredCREATION_TRACE, ourTraceStubAstBindingFLAGS_LOCKED, ICON_PLACEHOLDERARRAY_FACTORY, EMPTY_ARRAY, EXPRESSION_TO_TYPEICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_NAVIGATABLE_ELEMENT_ARRAYEMPTY_NAVIGATION_ITEM_ARRAY| Constructor and Description |
|---|
PsiLiteralExpressionImpl(ASTNode node) |
PsiLiteralExpressionImpl(PsiLiteralStub stub) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
LiteralTextEscaper<PsiLiteralExpressionImpl> |
createLiteralTextEscaper() |
java.lang.String |
getCanonicalText() |
PsiElement [] |
getChildren()
Returns the array of children for the PSI element.
|
java.lang.String |
getInnerText() |
IElementType |
getLiteralElementType() |
PsiReference [] |
getReferences()
Returns all references from this PSI element to other PSI elements.
|
java.lang.String |
getText()
Returns the text of the PSI element.
|
int |
getTextBlockIndent() |
java.lang.String [] |
getTextBlockLines() |
java.lang.String |
getTextBlockText() |
PsiType |
getType()
Returns the type of the expression.
|
java.lang.Object |
getValue()
Returns the value of the literal expression (an Integer for an integer constant, a String
for a string literal, and so on).
|
boolean |
isValidHost() |
static boolean |
parseStringCharacters(java.lang.String chars,
java.lang.StringBuilder outChars,
int [] sourceOffsets) |
java.lang.String |
toString()
toString() should never be presented to the user.
|
PsiLanguageInjectionHost |
updateText(java.lang.String text)
Update the host element using the provided text of the injected file.
|
acceptChildren, add, addAfter, addBefore, calcTreeElement, checkAdd, clone, cloneImpl, delete, deleteChildRange, getLanguage, getTextOffset, replacegetContainingFile, getContext, getElementType, getGreenStub, getManager, getNode, getParent, getParentByStub, getParentByTree, getProject, getRequiredStubOrPsiChild, getStub, getStubOrPsiChild, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiChildren, getStubOrPsiParentOfType, isPhysical, isValid, isWritable, setNode, setSubstrateRefaddInternal, addRange, addRangeAfter, addRangeBefore, checkDelete, copy, deleteChildInternal, findChildByFilter, findChildByType, findChildByType, findChildrenByType, findChildrenByType, findChildrenByType, findChildrenByType, findElementAt, findLastChildByType, findNotNullChildByType, findNotNullChildByType, getCopyableUserData, getFirstChild, getLastChild, getNextSibling, getPrevSibling, getStartOffsetInParent, getTextLength, getTextRange, putCopyableUserData, replaceChildInternal, subtreeChanged, textContains, textMatches, textToCharArraycanNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getName, getNavigationElement, getOriginalElement, getPresentation, getReference, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textMatchesbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlagschangeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitacceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getResolveScope, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArraygetUserData, putUserDatagetElementType, getStubpublic PsiLiteralExpressionImpl(PsiLiteralStub stub)
public PsiLiteralExpressionImpl(ASTNode node)
public PsiElement [] getChildren()
PsiElementgetChildren in interface PsiElementgetChildren in class JavaStubPsiElement<PsiLiteralStub>public PsiType getType()
PsiExpressiongetType in interface PsiExpressionpublic IElementType getLiteralElementType()
public java.lang.String getCanonicalText()
public java.lang.String getText()
PsiElementgetText in interface PsiElementgetText in class ASTDelegatePsiElementPsiElement.textMatches(java.lang.CharSequence),
PsiElement.textContains(char)public java.lang.Object getValue()
PsiLiteralValuegetValue in interface PsiLiteralValuepublic java.lang.String getInnerText()
public java.lang.String getTextBlockText()
public int getTextBlockIndent()
public java.lang.String [] getTextBlockLines()
public static boolean parseStringCharacters(java.lang.String chars,
java.lang.StringBuilder outChars,
int [] sourceOffsets)
public void accept(PsiElementVisitor visitor)
PsiElementaccept in interface PsiElementaccept in class PsiElementBasevisitor - the visitor to pass the element to.public java.lang.String toString()
PsiElementtoString in interface PsiElementtoString in class java.lang.Objectpublic boolean isValidHost()
isValidHost in interface PsiLanguageInjectionHosttrue if this instance can accept injections, false otherwisepublic PsiReference [] getReferences()
PsiElementPsiPolyVariantReference should be used instead
of returning multiple references.
Actually, it's preferable to call PsiReferenceService.getReferences(com.intellij.psi.PsiElement, com.intellij.psi.PsiReferenceService.Hints) instead
as it allows adding references by plugins when the element implements ContributedReferenceHost.getReferences in interface ContributedReferenceHostgetReferences in interface PsiElementgetReferences in class PsiElementBasePsiReferenceService.getReferences(com.intellij.psi.PsiElement, com.intellij.psi.PsiReferenceService.Hints),
ReferencesSearchpublic PsiLanguageInjectionHost updateText(java.lang.String text)
PsiLanguageInjectionHosttext
in accordance with the host language syntax. The implementation may delegate to ElementManipulators.handleContentChange(PsiElement, String)
if ElementManipulator implementation is registered for this element class.updateText in interface PsiLanguageInjectionHosttext - text of the injected filepublic LiteralTextEscaper<PsiLiteralExpressionImpl> createLiteralTextEscaper()
createLiteralTextEscaper in interface PsiLanguageInjectionHostLiteralTextEscaper instance which will be used to convert the content of this host element to the content of injected file