Package org.springframework.core
Class NativeDetector
java.lang.Object
org.springframework.core.NativeDetector
A common delegate for detecting a GraalVM native image environment.
- Since:
- 5.3.4
- Author:
- Sebastien Deleuze
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumNative image context as defined in GraalVM's ImageInfo.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic booleanReturnstrueif running in a native image context (for examplebuildtime,runtime, oragent) expressed by setting theorg.graalvm.nativeimage.imagecodesystem property to any value.static booleaninNativeImage(NativeDetector.Context... contexts) Returnstrueif running in any of the specified native image context(s).
- 
Constructor Details- 
NativeDetectorpublic NativeDetector()
 
- 
- 
Method Details- 
inNativeImagepublic static boolean inNativeImage()Returnstrueif running in a native image context (for examplebuildtime,runtime, oragent) expressed by setting theorg.graalvm.nativeimage.imagecodesystem property to any value.
- 
inNativeImageReturnstrueif running in any of the specified native image context(s).- Parameters:
- contexts- the native image context(s)
- Since:
- 6.0.10
 
 
-