Enum Class Visibility

java.lang.Object
java.lang.Enum<Visibility>
com.github.tadukoo.java.Visibility
All Implemented Interfaces:
JavaTokens, Serializable, Comparable<Visibility>, Constable

public enum Visibility extends Enum<Visibility> implements JavaTokens
Visibility represents the visibility of a given Java class, method, etc.
Since:
Alpha v.0.2
Version:
Beta v.0.5
Author:
Logan Ferree (Tadukoo)
  • Enum Constant Details

    • PUBLIC

      public static final Visibility PUBLIC
      Used for public visibility - anything can see it
    • PROTECTED

      public static final Visibility PROTECTED
      Used for protected visibility - only the current class and subclasses can see it
    • PRIVATE

      public static final Visibility PRIVATE
      Used for private visibility - only the current class can see it
    • NONE

      public static final Visibility NONE
      Used when there's no specified visibility (e.g. interface methods, where public is implied)
  • 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
    • getToken

      public String getToken()
      Returns:
      The text to use for the visibility
    • fromToken

      public static Visibility fromToken(String token)
      Grabs the Visibility that corresponds to the given token
      Parameters:
      token - The token used for the visibility (to use in searching)
      Returns:
      The found Visibility, or null