- All Implemented Interfaces:
Modifier,Serializable,Comparable<AccessLevel>,Constable
The possible access levels for an item.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionThe package-private ("default") access level.Theprivateaccess level.Theprotectedaccess level.Thepublicaccess level. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic intfullMask()Returns the full bitmask for all access levels.intmask()Returns the bitmask of this modifier.static AccessLevelof(int bits) Returns the access level indicated by the given bit mask.booleanvalidIn(ModifierLocation location) Returnstrueif this modifier is valid in the given location, orfalseif it is invalid.static AccessLevelReturns the enum constant of this class with the specified name.static AccessLevel[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRIVATE
Theprivateaccess level. -
PACKAGE_PRIVATE
The package-private ("default") access level. -
PROTECTED
Theprotectedaccess level. -
PUBLIC
Thepublicaccess level.
-
-
Field Details
-
values
The list of access values.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
validIn
Description copied from interface:ModifierReturnstrueif this modifier is valid in the given location, orfalseif it is invalid. -
mask
public int mask()Description copied from interface:ModifierReturns the bitmask of this modifier. -
of
Returns the access level indicated by the given bit mask. If multiple access bits are present, then the access level with the highest bit value is returned.- Parameters:
bits- the bit mask- Returns:
- the access level indicated by the given bit mask
-
fullMask
public static int fullMask()Returns the full bitmask for all access levels.- Returns:
- the full bitmask for all access levels
-