Enum Class ModifierOwner.Visibility
- All Implemented Interfaces:
Serializable
,Comparable<ModifierOwner.Visibility>
,Constable
- Enclosing interface:
ModifierOwner
Represents the visibility of a declaration.
The ordering of the constants encodes a "contains" relationship,
ie, given two visibilities v1
and v2
, v1 < v2
means that v2
is strictly more permissive than v1
.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionSpecial visibility of anonymous classes, even more restricted than local.Confined to a local scope, eg method parameters, local variables, local classes.Package-private.File-private.Package-private + visible to subclasses.Visible everywhere. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Returns true if this visibility is greater than or equal to the parameter.boolean
isAtMost
(ModifierOwner.Visibility other) Returns true if this visibility is lower than or equal to the parameter.toString()
static ModifierOwner.Visibility
Returns the enum constant of this class with the specified name.static ModifierOwner.Visibility[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
V_ANONYMOUS
Special visibility of anonymous classes, even more restricted than local. -
V_LOCAL
Confined to a local scope, eg method parameters, local variables, local classes. -
V_PRIVATE
File-private. Corresponds to modifierJModifier.PRIVATE
. -
V_PACKAGE
Package-private. -
V_PROTECTED
Package-private + visible to subclasses. Corresponds to modifierJModifier.PROTECTED
. -
V_PUBLIC
Visible everywhere. Corresponds to modifierJModifier.PUBLIC
.
-
-
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
-
toString
- Overrides:
toString
in classEnum<ModifierOwner.Visibility>
-
isAtLeast
Returns true if this visibility is greater than or equal to the parameter. -
isAtMost
Returns true if this visibility is lower than or equal to the parameter.
-