public class PsiModifierListImpl extends JavaStubPsiElement<PsiModifierListStub> implements PsiModifierList
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 |
---|
PsiModifierListImpl(ASTNode node) |
PsiModifierListImpl(PsiModifierListStub stub) |
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.
|
void |
checkSetModifierProperty(java.lang.String name,
boolean value)
Checks if it is possible to add or remove the specified modifier to the modifier list,
and throws an exception if the operation is not possible.
|
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() |
boolean |
hasExplicitModifier(java.lang.String name)
Checks if the modifier list has the specified modifier set by an explicit keyword.
|
boolean |
hasModifierProperty(java.lang.String name)
Checks if the modifier list has the specified modifier set either by an explicit keyword
or implicitly (for example, interface methods are implicitly public).
|
void |
setModifierProperty(java.lang.String name,
boolean value)
Adds or removes the specified modifier to the modifier list.
|
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, getNode, 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, subtreeChanged, textContains, textMatches, textToCharArray
canNavigate, canNavigateToSource, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getName, getNavigationElement, getOriginalElement, getPresentation, getReference, 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
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, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArray
getUserData, putUserData
hasAnnotation
getElementType, getStub
public PsiModifierListImpl(PsiModifierListStub stub)
public PsiModifierListImpl(ASTNode node)
public boolean hasModifierProperty(java.lang.String name)
PsiModifierList
hasModifierProperty
in interface PsiModifierList
name
- the name of the modifier to check.PsiModifierList.hasExplicitModifier(String)
public boolean hasExplicitModifier(java.lang.String name)
PsiModifierList
hasExplicitModifier
in interface PsiModifierList
name
- the name of the modifier to check.PsiModifierList.hasModifierProperty(String)
public void setModifierProperty(java.lang.String name, boolean value) throws IncorrectOperationException
PsiModifierList
setModifierProperty
in interface PsiModifierList
name
- the name of the modifier to add or remove.value
- true if the modifier should be added, false if it should be removed.IncorrectOperationException
- if the modification fails for some reason.public void checkSetModifierProperty(java.lang.String name, boolean value) throws IncorrectOperationException
PsiModifierList
checkSetModifierProperty
in interface PsiModifierList
name
- the name of the modifier to check the add or remove possibility for.value
- true if the modifier should be added, false if it should be removed.IncorrectOperationException
- if the modification fails for some reason.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 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