Enum Class JavaVersion

java.lang.Object
java.lang.Enum<JavaVersion>
cn.taketoday.core.JavaVersion
所有已实现的接口:
Serializable, Comparable<JavaVersion>, Constable

public enum JavaVersion extends Enum<JavaVersion>
Known Java versions.
从以下版本开始:
4.0 2022/4/4 12:23
作者:
Oliver Gierke, Phillip Webb, Harry Yang
  • 枚举常量详细资料

    • SEVENTEEN

      public static final JavaVersion SEVENTEEN
      Java 17.
    • EIGHTEEN

      public static final JavaVersion EIGHTEEN
      Java 18.
    • NINETEEN

      public static final JavaVersion NINETEEN
      Java 19.
    • TWENTY

      public static final JavaVersion TWENTY
      Java 20.
    • TWENTY_ONE

      public static final JavaVersion TWENTY_ONE
      Java 21.
  • 字段详细资料

    • name

      private final String name
    • available

      private final boolean available
  • 构造器详细资料

    • JavaVersion

      private JavaVersion(String name, Class<?> clazz, String methodName)
  • 方法详细资料

    • values

      public static JavaVersion[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      返回:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static JavaVersion 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.)
      参数:
      name - 要返回的枚举常量的名称。
      返回:
      返回带有指定名称的枚举常量
      抛出:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - 如果参数为空值
    • toString

      public String toString()
      覆盖:
      toString 在类中 Enum<JavaVersion>
    • getJavaVersion

      public static JavaVersion getJavaVersion()
      Returns the JavaVersion of the current runtime.
      返回:
      the JavaVersion
    • isEqualOrNewerThan

      public boolean isEqualOrNewerThan(JavaVersion version)
      Return if this version is equal to or newer than a given version.
      参数:
      version - the version to compare
      返回:
      true if this version is equal to or newer than version
    • isOlderThan

      public boolean isOlderThan(JavaVersion version)
      Return if this version is older than a given version.
      参数:
      version - the version to compare
      返回:
      true if this version is older than version