public enum AccessModifier extends java.lang.Enum<AccessModifier>
Enum Constant and Description |
---|
PACKAGE_LOCAL |
PRIVATE |
PROTECTED |
PUBLIC |
Modifier and Type | Field and Description |
---|---|
static java.util.List<AccessModifier> |
ALL_MODIFIERS |
Modifier and Type | Method and Description |
---|---|
static AccessModifier |
fromKeyword(PsiKeyword keyword)
Returns an
AccessModifier which corresponds to the given keyword;
null if supplied keyword is null or don't correspond to access modifier |
static AccessModifier |
fromModifierList(PsiModifierList modifierList) |
static AccessModifier |
fromPsiModifier(java.lang.String modifier)
Returns an
AccessModifier which corresponds to the given String constant declared in
PsiModifier class. |
static java.util.List<AccessModifier> |
getAvailableModifiers(PsiMember member) |
boolean |
hasModifier(PsiModifierListOwner owner)
Checks whether given modifier owner has this access modifier (probably implicit)
|
boolean |
isWeaker(AccessModifier other) |
java.lang.String |
toPsiModifier() |
java.lang.String |
toString() |
static AccessModifier |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static AccessModifier[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final AccessModifier PUBLIC
public static final AccessModifier PROTECTED
public static final AccessModifier PACKAGE_LOCAL
public static final AccessModifier PRIVATE
public static final java.util.List<AccessModifier> ALL_MODIFIERS
public static AccessModifier[] values()
for (AccessModifier c : AccessModifier.values()) System.out.println(c);
public static AccessModifier valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullpublic java.lang.String toPsiModifier()
PsiModifier
string constant which corresponds to this access modifier.public boolean hasModifier(PsiModifierListOwner owner)
owner
- element to check (e.g. class member)public static AccessModifier fromKeyword(PsiKeyword keyword)
AccessModifier
which corresponds to the given keyword;
null if supplied keyword is null or don't correspond to access modifierkeyword
- keyword to convert to access modifierpublic static AccessModifier fromPsiModifier(java.lang.String modifier)
AccessModifier
which corresponds to the given String constant declared in
PsiModifier
class.modifier
- a modifier stringpublic static AccessModifier fromModifierList(PsiModifierList modifierList)
public boolean isWeaker(AccessModifier other)
public java.lang.String toString()
toString
in class java.lang.Enum<AccessModifier>
public static java.util.List<AccessModifier> getAvailableModifiers(PsiMember member)