Enum Class Visibility
- All Implemented Interfaces:
Serializable, Comparable<Visibility>, Constable
How widely an element can be accessed, as its access modifier, or the lack of one, says: see
MoreElements.visibility(javax.lang.model.element.Element) and
MoreElements.effectiveVisibility(javax.lang.model.element.Element).
The constants are ordered from the most restrictive to the most open, so that a.compareTo(b) < 0 when
a is more restrictive than b.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAccessible within the package of the element, without an access modifier.Accessible within the top-level type that declares the element only.Accessible within the package of the element, and from the subclasses of the type that declares it.Accessible wherever the element's module lets it be. -
Method Summary
Modifier and TypeMethodDescriptionstatic VisibilityReturns the enum constant of this class with the specified name.static Visibility[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
PRIVATE
Accessible within the top-level type that declares the element only. An element that can only be named within a block or a declaration, such as a local class or a type parameter, is private too: code outside that top-level type cannot access it either. -
PACKAGE
Accessible within the package of the element, without an access modifier. -
PROTECTED
Accessible within the package of the element, and from the subclasses of the type that declares it. -
PUBLIC
Accessible wherever the element's module lets it be.
-
-
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
-