Enum Class Visibility

java.lang.Object
java.lang.Enum<Visibility>
be.imgn.gaia.processing.Visibility
All Implemented Interfaces:
Serializable, Comparable<Visibility>, Constable

public enum Visibility extends Enum<Visibility>
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.

  • Enum Constant Details

    • PRIVATE

      public static final Visibility 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

      public static final Visibility PACKAGE
      Accessible within the package of the element, without an access modifier.
    • PROTECTED

      public static final Visibility PROTECTED
      Accessible within the package of the element, and from the subclasses of the type that declares it.
    • PUBLIC

      public static final Visibility PUBLIC
      Accessible wherever the element's module lets it be.
  • Method Details

    • values

      public static Visibility[] 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

      public static Visibility valueOf(String name)
      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 name
      NullPointerException - if the argument is null