Enum Class ModifierOwner.Visibility

java.lang.Object
java.lang.Enum<ModifierOwner.Visibility>
net.sourceforge.pmd.lang.java.ast.ModifierOwner.Visibility
All Implemented Interfaces:
Serializable, Comparable<ModifierOwner.Visibility>, Constable
Enclosing interface:
ModifierOwner

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

  • Enum Constant Details

  • Method Details

    • values

      public static ModifierOwner.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 ModifierOwner.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
    • toString

      public String toString()
      Overrides:
      toString in class Enum<ModifierOwner.Visibility>
    • isAtLeast

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

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