Class SourceVersion

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

public final class SourceVersion
extends Object
JDK source version utilities.
See Also:
RuntimeVersion
  • Method Summary

    Modifier and Type Method Description
    static boolean supportsEffectivelyFinal​(com.sun.tools.javac.util.Context context)
    Returns true if the compiler source version level supports effectively final.
    static boolean supportsSwitchExpressions​(com.sun.tools.javac.util.Context context)
    Returns true if the compiler source version level supports switch expressions.
    static boolean supportsTextBlocks​(com.sun.tools.javac.util.Context context)
    Returns true if the compiler source version level supports text blocks.

    Methods inherited from class java.lang.Object

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

    • supportsSwitchExpressions

      public static boolean supportsSwitchExpressions​(com.sun.tools.javac.util.Context context)
      Returns true if the compiler source version level supports switch expressions.
    • supportsTextBlocks

      public static boolean supportsTextBlocks​(com.sun.tools.javac.util.Context context)
      Returns true if the compiler source version level supports text blocks.
    • supportsEffectivelyFinal

      public static boolean supportsEffectivelyFinal​(com.sun.tools.javac.util.Context context)
      Returns true if the compiler source version level supports effectively final.