Class SourceVersion
java.lang.Object
com.google.errorprone.util.SourceVersion
JDK source version utilities.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleansupportsInstanceMainMethods(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports instance main methods.static booleansupportsPatternMatchingInstanceof(com.sun.tools.javac.util.Context context) Returns whether the compiler supports pattern-matching instanceofs.static booleansupportsPatternMatchingSwitch(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports pattern-matching switches.static booleansupportsStaticInnerClass(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports static inner classes.static booleansupportsSwitchExpressions(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports switch expressions.static booleansupportsTextBlocks(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports text blocks.
-
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. -
supportsPatternMatchingInstanceof
public static boolean supportsPatternMatchingInstanceof(com.sun.tools.javac.util.Context context) Returns whether the compiler supports pattern-matching instanceofs. -
supportsStaticInnerClass
public static boolean supportsStaticInnerClass(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports static inner classes. -
supportsPatternMatchingSwitch
public static boolean supportsPatternMatchingSwitch(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports pattern-matching switches. -
supportsInstanceMainMethods
public static boolean supportsInstanceMainMethods(com.sun.tools.javac.util.Context context) Returns true if the compiler source version level supports instance main methods.
-