Class VersionUtils

java.lang.Object
org.openjdk.jmc.agent.util.VersionUtils

public final class VersionUtils extends Object
  • Field Details

    • AVAILABLE_JFR_VERSION

      private static final VersionUtils.JFRVersion AVAILABLE_JFR_VERSION
    • FEATURE_VERSION

      private static final int FEATURE_VERSION
  • Constructor Details

    • VersionUtils

      private VersionUtils()
  • Method Details

    • determineJFRVersion

      private static VersionUtils.JFRVersion determineJFRVersion()
    • getAvailableJFRVersion

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

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

      private static int determineFeatureVersion()
    • getMethod

      private static Method getMethod(Class<?> clazz, String methodName) throws Exception
      Throws:
      Exception