com.fasterxml.jackson.databind.util

Class NativeImageUtil



  • public class NativeImageUtil
    extends Object
    Utilities for graal native image support; mostly to improve error message handling in case of missing information for native image.
    Since:
    2.14
    • Method Detail

      • isInNativeImageAndIsAtRuntime

        public static boolean isInNativeImageAndIsAtRuntime()
        Check whether we're running in SubstrateVM native image and also in "runtime" mode. The "runtime" check cannot be a constant, because the static initializer may run early during build time

        As optimization, RUNNING_IN_SVM is used to short-circuit on normal JVMs.

        Since:
        2.16
      • isInNativeImage

        public static boolean isInNativeImage()
        Checks whether we're running in SubstrateVM native image only by the presence of "org.graalvm.nativeimage.imagecode" system property, regardless of its value (buildtime or runtime). We are irrespective of the build or runtime phase, because native-image can initialize static initializers at build time.

        Since:
        2.16
      • isUnsupportedFeatureError

        public static boolean isUnsupportedFeatureError(Throwable e)
        Check whether the given error is a substratevm UnsupportedFeatureError
      • needsReflectionConfiguration

        public static boolean needsReflectionConfiguration(Class<?> cl)
        Check whether the given class is likely missing reflection configuration (running in native image, and no members visible in reflection).

Copyright © 2008–2024 FasterXML. All rights reserved.