public class PsiParameterImpl extends JavaStubPsiElement<PsiParameterStub> implements PsiParameter
Iconable.IconFlags, Iconable.LastComputedIconCREATION_TRACE, ourTraceStubAstBindingFLAGS_LOCKED, ICON_PLACEHOLDERARRAY_FACTORY, EMPTY_ARRAYICON_FLAG_IGNORE_MASK, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITYEMPTY_NAVIGATABLE_ELEMENT_ARRAYEMPTY_NAVIGATION_ITEM_ARRAY| Modifier | Constructor and Description |
|---|---|
|
PsiParameterImpl(ASTNode node) |
|
PsiParameterImpl(PsiParameterStub stub) |
protected |
PsiParameterImpl(PsiParameterStub stub,
IStubElementType type) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(PsiElementVisitor visitor)
Passes the element to the specified visitor.
|
protected java.lang.Object |
clone() |
java.lang.Object |
computeConstantValue()
Calculates and returns the constant value of the variable initializer.
|
PsiElement |
getDeclarationScope()
Returns the element (method, lambda expression, foreach statement or catch block) in which the
parameter is declared.
|
javax.swing.Icon |
getElementIcon(int flags) |
PsiExpression |
getInitializer()
Returns the initializer for the variable.
|
static PsiType |
getLambdaParameterType(PsiParameter param) |
PsiModifierList |
getModifierList()
Returns the list of modifiers for the element.
|
java.lang.String |
getName()
Returns the name of the element.
|
PsiIdentifier |
getNameIdentifier()
Returns the identifier declaring the name of the variable.
|
CompositeElement |
getNode()
Ensures this element is AST-based.
|
PsiElement |
getOriginalElement()
Returns the PSI element which corresponds to this element and belongs to
either the project source path or class path.
|
ItemPresentation |
getPresentation() |
PsiType |
getType()
Returns the type of the variable.
|
PsiTypeElement |
getTypeElement()
Returns the type element declaring the type of the variable.
|
SearchScope |
getUseScope()
Returns the scope in which references to this element are searched.
|
boolean |
hasInitializer()
Checks if the variable has an initializer.
|
boolean |
hasModifierProperty(java.lang.String name)
Checks if the element has the specified modifier.
|
boolean |
isVarArgs()
Checks if the parameter accepts a variable number of arguments.
|
protected boolean |
isVisibilitySupported() |
void |
normalizeDeclaration()
Ensures that the variable declaration is not combined in the same statement with
other declarations.
|
PsiElement |
setName(java.lang.String name)
Renames the element.
|
void |
subtreeChanged() |
java.lang.String |
toString()
toString() should never be presented to the user.
|
acceptChildren, add, addAfter, addBefore, calcTreeElement, checkAdd, cloneImpl, delete, deleteChildRange, getChildren, getLanguage, getTextOffset, replacegetContainingFile, getContext, getElementType, getGreenStub, getManager, 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, getText, getTextLength, getTextRange, putCopyableUserData, replaceChildInternal, textContains, textMatches, textToCharArraycanNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getNavigationElement, getReference, getReferences, getResolveScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textMatchesbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, overlayIcons, registerIconLayer, transformFlagschangeUserMap, clearUserData, copyCopyableDataTo, copyUserDataTo, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putUserData, putUserDataIfAbsent, replace, setUserMapequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetAnnotationssetInitializergetIdentifyingElementacceptChildren, add, addAfter, addBefore, addRange, addRangeAfter, addRangeBefore, checkAdd, checkDelete, copy, delete, deleteChildRange, findElementAt, findReferenceAt, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getText, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArraygetUserData, putUserDatagetNavigationElementisWritablecanNavigate, canNavigateToSource, navigateacceptgetAnnotation, getSourceElement, hasAnnotation, hasModifiergetElementType, getStubpublic PsiParameterImpl(PsiParameterStub stub)
protected PsiParameterImpl(PsiParameterStub stub, IStubElementType type)
public PsiParameterImpl(ASTNode node)
public static PsiType getLambdaParameterType(PsiParameter param)
public void subtreeChanged()
subtreeChanged in class ASTDelegatePsiElementprotected java.lang.Object clone()
clone in class JavaStubPsiElement<PsiParameterStub>public final java.lang.String getName()
PsiNamedElementgetName in interface JvmNamedElementgetName in interface NavigationItemgetName in interface PomNamedTargetgetName in interface PsiNamedElementgetName in interface PsiParametergetName in class PsiElementBasepublic final PsiElement setName(java.lang.String name) throws IncorrectOperationException
PsiNamedElementsetName in interface PomRenameableTarget<PsiElement>setName in interface PsiNamedElementsetName in interface PsiVariablename - the new element name.this
or a different element if the rename caused the element to be replaced).IncorrectOperationException - if the modification is not supported or not possible for some reason.public final PsiIdentifier getNameIdentifier()
PsiVariablegetNameIdentifier in interface PsiNameIdentifierOwnergetNameIdentifier in interface PsiVariablepublic CompositeElement getNode()
StubBasedPsiElementBasegetNode in interface PsiElementgetNode in class StubBasedPsiElementBase<PsiParameterStub>StubBasedPsiElementBase.getStub() will return null.public PsiType getType()
PsiVariablegetType in interface JvmParametergetType in interface PsiParametergetType in interface PsiVariableParameter.getParameterizedType(),
Parameter.getAnnotatedType()public PsiTypeElement getTypeElement()
PsiParametergetTypeElement in interface PsiParametergetTypeElement in interface PsiVariablepublic PsiModifierList getModifierList()
PsiModifierListOwnergetModifierList in interface PsiModifierListOwnerpublic boolean hasModifierProperty(java.lang.String name)
PsiModifierListOwnerPsiModifier class.hasModifierProperty in interface PsiModifierListOwnername - the name of the modifier to check.public PsiExpression getInitializer()
PsiVariablegetInitializer in interface PsiVariablePsiVariable.hasInitializer()public boolean hasInitializer()
PsiVariableChecks if the variable has an initializer.
Please note that even when PsiVariable.hasInitializer() returns true, PsiVariable.getInitializer() still can return null,
e.g. for implicit initializer in case of enum constant declaration.
hasInitializer in interface PsiVariablepublic java.lang.Object computeConstantValue()
PsiVariablecomputeConstantValue in interface PsiVariablepublic void normalizeDeclaration()
throws IncorrectOperationException
PsiVariableint[] a)
and not in C style (int a[]).normalizeDeclaration in interface PsiVariableIncorrectOperationException - if the modification fails for some reason.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 PsiElement getDeclarationScope()
PsiParametergetDeclarationScope in interface PsiParameterpublic boolean isVarArgs()
PsiParameterisVarArgs in interface PsiParameterpublic ItemPresentation getPresentation()
getPresentation in interface NavigationItemgetPresentation in class PsiElementBasepublic javax.swing.Icon getElementIcon(int flags)
getElementIcon in class ElementBaseprotected boolean isVisibilitySupported()
isVisibilitySupported in class ElementBasepublic SearchScope getUseScope()
PsiElementgetUseScope in interface PsiElementgetUseScope in class PsiElementBasePsiSearchHelper.getUseScope(PsiElement)public PsiElement getOriginalElement()
PsiElementthis or substitute a different element if this element does
not belong to the source path or class path. (For example, the original
element for a library source file is the corresponding compiled class file.)getOriginalElement in interface PsiElementgetOriginalElement in class PsiElementBase