Enum AccessNode.Visibility

  • All Implemented Interfaces:
    Serializable, Comparable<AccessNode.Visibility>
    Enclosing interface:
    AccessNode

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

    • Method Detail

      • values

        public static AccessNode.Visibility[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AccessNode.Visibility c : AccessNode.Visibility.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AccessNode.Visibility valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • isAtLeast

        public boolean isAtLeast​(AccessNode.Visibility other)
        Returns true if this visibility is greater than or equal to the parameter.
      • isAtMost

        public boolean isAtMost​(AccessNode.Visibility other)
        Returns true if this visibility is lower than or equal to the parameter.