Class NativeDetector

java.lang.Object
org.springframework.core.NativeDetector

public abstract class NativeDetector extends Object
A common delegate for detecting a GraalVM native image environment.

Requires using the -H:+InlineBeforeAnalysis native image compiler flag in order to allow code removal at build time.

Since:
5.3.4
Author:
Sebastien Deleuze
  • Constructor Details

    • NativeDetector

      public NativeDetector()
  • Method Details

    • inNativeImage

      public static boolean inNativeImage()
      Returns true if invoked in the context of image building or during image runtime, else false.