com.google.gson.util

Class VersionUtils

  • java.lang.Object
    • com.google.gson.util.VersionUtils


  • public class VersionUtils
    extends java.lang.Object
    Utility to check the major Java version of the current JVM.
    • Constructor Summary

      Constructors 
      Constructor and Description
      VersionUtils() 
    • Constructor Detail

      • VersionUtils

        public VersionUtils()
    • Method Detail

      • getMajorJavaVersion

        public static int getMajorJavaVersion()
        Returns:
        the major Java version, i.e. '8' for Java 1.8, '9' for Java 9 etc.
      • isJava9OrLater

        public static boolean isJava9OrLater()
        Returns:
        true if the application is running on Java 9 or later; and false otherwise.

Copyright © 2018. All Rights Reserved.