Class RuntimeVersion

java.lang.Object
com.google.errorprone.util.RuntimeVersion

public class RuntimeVersion
extends Object
JDK version string utilities.
  • Constructor Summary

    Constructors
    Constructor Description
    RuntimeVersion()  
  • 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 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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RuntimeVersion

      public RuntimeVersion()
  • 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.
    • isAtLeast15

      public static boolean isAtLeast15()
      Returns true if the current runtime is JDK 15 or newer.