public class NativeImageUtil extends Object
Modifier and Type | Method and Description |
---|---|
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). |
static boolean |
isInNativeImageAndIsAtRuntime()
Check whether we're running in SubstrateVM native image and also in "runtime" mode.
|
static boolean |
isUnsupportedFeatureError(Throwable e)
Check whether the given error is a substratevm UnsupportedFeatureError
|
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).
|
public static boolean isInNativeImageAndIsAtRuntime()
As optimization, RUNNING_IN_SVM
is used to short-circuit on normal JVMs.
public static boolean isInNativeImage()
"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.
public static boolean isUnsupportedFeatureError(Throwable e)
public static boolean needsReflectionConfiguration(Class<?> cl)
Copyright © 2008–2024 FasterXML. All rights reserved.