|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface PsiModifierList
Represents the list of modifiers and annotations on a Java element (class, method,
field and so on). Possible modifiers are defined as constants in the PsiModifier class.
PsiModifierListOwner.getModifierList()| Field Summary |
|---|
| Fields inherited from interface com.intellij.psi.PsiElement |
|---|
EMPTY_ARRAY |
| Fields inherited from interface com.intellij.openapi.util.Iconable |
|---|
ICON_FLAG_CLOSED, ICON_FLAG_OPEN, ICON_FLAG_READ_STATUS, ICON_FLAG_VISIBILITY |
| Method Summary | |
|---|---|
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 modifier list for an annotation with the specified fully qualified name and returns one if it is found. |
PsiAnnotation[] |
getAnnotations()
Returns the list of annotations contained in the modifier list. |
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. |
| Methods inherited from interface com.intellij.openapi.util.UserDataHolder |
|---|
getUserData, putUserData |
| Methods inherited from interface com.intellij.openapi.util.Iconable |
|---|
getIcon |
| Method Detail |
|---|
boolean hasModifierProperty(@NotNull
java.lang.String name)
name - the name of the modifier to check.
hasExplicitModifier(String)
boolean hasExplicitModifier(@NotNull
java.lang.String name)
name - the name of the modifier to check.
hasModifierProperty(String)
void setModifierProperty(@NotNull
java.lang.String name,
boolean value)
throws IncorrectOperationException
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.
void checkSetModifierProperty(@NotNull
java.lang.String name,
boolean value)
throws IncorrectOperationException
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.@NotNull PsiAnnotation[] getAnnotations()
@Nullable
PsiAnnotation findAnnotation(@NotNull
java.lang.String qualifiedName)
qualifiedName - the fully qualified name of the annotation to find.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||