Package com.google.errorprone.util
Class RuntimeVersion
java.lang.Object
com.google.errorprone.util.RuntimeVersion
public final class RuntimeVersion extends Object
JDK version string utilities.
-
Method Summary
Modifier and Type Method Description static boolean
isAtLeast10()
Returns true if the current runtime is JDK 10 or newer.static boolean
isAtLeast11()
Returns true if the current runtime is JDK 11 or newer.static boolean
isAtLeast12()
Returns true if the current runtime is JDK 12 or newer.static boolean
isAtLeast13()
Returns true if the current runtime is JDK 13 or newer.static boolean
isAtLeast14()
Returns true if the current runtime is JDK 14 or newer.static boolean
isAtLeast15()
Returns true if the current runtime is JDK 15 or newer.static boolean
isAtLeast8()
Returns true if the current runtime is JDK 8 or newer.static boolean
isAtLeast9()
Returns true if the current runtime is JDK 9 or newer.static boolean
isAtMost10()
Returns true if the current runtime is JDK 10 or earlier.static int
release()
Returns the latest--release
version.
-
Method Details
-
isAtLeast8
public static boolean isAtLeast8()Returns true if the current runtime is JDK 8 or newer. -
isAtLeast9
public static boolean isAtLeast9()Returns true if the current runtime is JDK 9 or newer. -
isAtLeast10
public static boolean isAtLeast10()Returns true if the current runtime is JDK 10 or newer. -
isAtMost10
public static boolean isAtMost10()Returns true if the current runtime is JDK 10 or earlier. -
isAtLeast11
public static boolean isAtLeast11()Returns true if the current runtime is JDK 11 or newer. -
isAtLeast12
public static boolean isAtLeast12()Returns true if the current runtime is JDK 12 or newer. -
isAtLeast13
public static boolean isAtLeast13()Returns true if the current runtime is JDK 13 or newer. -
isAtLeast14
public static boolean isAtLeast14()Returns true if the current runtime is JDK 14 or newer. -
isAtLeast15
public static boolean isAtLeast15()Returns true if the current runtime is JDK 15 or newer. -
release
public static int release()Returns the latest--release
version.Prefer the
isAtLeast
methods for assumption checks in tests.
-