Class NativeImageUtil
java.lang.Object
com.fasterxml.jackson.databind.util.NativeImageUtil
Utilities for graal native image support; mostly to improve error message handling
in case of missing information for native image.
- Since:
- 2.14
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
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).static boolean
Check whether we're running in SubstrateVM native image and also in "runtime" mode.static boolean
Check whether the given error is a substratevm UnsupportedFeatureErrorstatic boolean
Check whether the given class is likely missing reflection configuration (running in native image, and no members visible in reflection).
-
Method Details
-
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 timeAs 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
Check whether the given error is a substratevm UnsupportedFeatureError -
needsReflectionConfiguration
Check whether the given class is likely missing reflection configuration (running in native image, and no members visible in reflection).
-