public class LightModifierList extends LightElement implements PsiModifierList
Iconable.IconFlags, Iconable.LastComputedIconmyManagerFLAGS_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| Constructor and Description |
|---|
LightModifierList(PsiManager manager) |
LightModifierList(PsiManager manager,
Language language,
java.lang.String... modifiers) |
LightModifierList(PsiModifierListOwner modifierListOwner) |
| 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 |
addModifier(java.lang.String modifier) |
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.
|
void |
clearModifiers() |
void |
copyModifiers(PsiModifierList modifierList) |
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() |
java.lang.String [] |
getModifiers() |
java.lang.String |
getText()
Returns the text of the PSI element.
|
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.
|
add, addAfter, addBefore, checkAdd, checkDelete, copy, delete, findElementAt, getChildren, getContainingFile, getLanguage, getManager, getNavigationElement, getNextSibling, getNode, getParent, getPrevSibling, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, isPhysical, isValid, isWritable, replace, setNavigationElement, textMatches, textMatches, textToCharArrayacceptChildren, addRange, addRangeAfter, addRangeBefore, canNavigate, canNavigateToSource, deleteChildRange, findChildByClass, findChildrenByClass, findNotNullChildByClass, findReferenceAt, getContext, getFirstChild, getLastChild, getName, getOriginalElement, getPresentation, getProject, getReference, getReferences, getResolveScope, getUseScope, isEquivalentTo, navigate, notNullChild, processDeclarations, textContainsbuildRowIcon, computeBaseIcon, createLayeredIcon, getAdjustedBaseIcon, getBaseIcon, getElementIcon, getIcon, iconWithVisibilityIfNeeded, isNativeFileType, isVisibilitySupported, overlayIcons, registerIconLayer, transformFlagschangeUserMap, clearUserData, clone, copyCopyableDataTo, copyUserDataTo, getCopyableUserData, getUserData, getUserDataString, getUserMap, isUserDataEmpty, putCopyableUserData, 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, getChildren, getContainingFile, getContext, getCopyableUserData, getFirstChild, getLanguage, getLastChild, getManager, getNavigationElement, getNextSibling, getNode, getOriginalElement, getOwnReferences, getParent, getPrevSibling, getProject, getReference, getReferences, getResolveScope, getStartOffsetInParent, getTextLength, getTextOffset, getTextRange, getTextRangeInParent, getUseScope, isEquivalentTo, isPhysical, isValid, isWritable, processDeclarations, putCopyableUserData, replace, textContains, textMatches, textMatches, textToCharArraygetUserData, putUserDatahasAnnotationpublic LightModifierList(PsiModifierListOwner modifierListOwner)
public LightModifierList(PsiManager manager)
public LightModifierList(PsiManager manager, Language language, java.lang.String... modifiers)
public void addModifier(java.lang.String modifier)
public void copyModifiers(PsiModifierList modifierList)
public void clearModifiers()
public boolean hasModifierProperty(java.lang.String name)
PsiModifierListhasModifierProperty in interface PsiModifierListname - the name of the modifier to check.PsiModifierList.hasExplicitModifier(String)public boolean hasExplicitModifier(java.lang.String name)
PsiModifierListhasExplicitModifier in interface PsiModifierListname - the name of the modifier to check.PsiModifierList.hasModifierProperty(String)public void setModifierProperty(java.lang.String name,
boolean value)
throws IncorrectOperationException
PsiModifierListsetModifierProperty in interface PsiModifierListname - 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
PsiModifierListcheckSetModifierProperty in interface PsiModifierListname - 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()
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 void accept(PsiElementVisitor visitor)
PsiElementaccept in interface PsiElementaccept in class LightElementvisitor - the visitor to pass the element to.public java.lang.String toString()
PsiElementtoString in interface PsiElementtoString in class LightElementpublic java.lang.String getText()
PsiElementgetText in interface PsiElementgetText in class LightElementPsiElement.textMatches(java.lang.CharSequence),
PsiElement.textContains(char)public java.lang.String [] getModifiers()