Enum Class Reason

java.lang.Object
java.lang.Enum<Reason>
me.croabeast.common.updater.Reason
All Implemented Interfaces:
Serializable, Comparable<Reason>, java.lang.constant.Constable

public enum Reason extends Enum<Reason>
Possible outcomes of an update check, describing why no update may be available or why an error occurred.
  • Enum Constant Details

    • NEW_UPDATE

      public static final Reason NEW_UPDATE
      A newer version is available remotely.
    • COULD_NOT_CONNECT

      public static final Reason COULD_NOT_CONNECT
      Could not establish a connection to the API endpoint.
    • INVALID_JSON

      public static final Reason INVALID_JSON
      The returned JSON was malformed or missing expected fields.
    • UNAUTHORIZED_QUERY

      public static final Reason UNAUTHORIZED_QUERY
      The API responded with HTTP 401 Unauthorized.
    • UNRELEASED_VERSION

      public static final Reason UNRELEASED_VERSION
      The locally installed version is ahead of the remote version.
    • UNKNOWN_ERROR

      public static final Reason UNKNOWN_ERROR
      Some other I/O or parsing error occurred.
    • UNSUPPORTED_VERSION_SCHEME

      public static final Reason UNSUPPORTED_VERSION_SCHEME
      The chosen VersionScheme could not compare the two version strings.
    • UP_TO_DATE

      public static final Reason UP_TO_DATE
      The plugin is already at the latest version.
  • Method Details

    • values

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