Class VersionUtils


  • public final class VersionUtils
    extends java.lang.Object
    • Field Detail

      • FEATURE_VERSION

        private static final int FEATURE_VERSION
    • Constructor Detail

      • VersionUtils

        private VersionUtils()
    • Method Detail

      • getAvailableJFRVersion

        public static VersionUtils.JFRVersion getAvailableJFRVersion()
        Returns the current JVM's JFR version.
      • getFeatureVersion

        public static java.util.OptionalInt getFeatureVersion()
        Returns the current JVM's feature (major) version, e.g. 8, 11, or 15.
      • determineFeatureVersion

        private static int determineFeatureVersion()
      • getMethod

        private static java.lang.reflect.Method getMethod​(java.lang.Class<?> clazz,
                                                          java.lang.String methodName)
                                                   throws java.lang.Exception
        Throws:
        java.lang.Exception