org.springframework.core

## 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 Summary

    Constructors
    Constructor and Description
    `NativeDetector()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static boolean` | `inNativeImage()` Returns `true` if invoked in the context of image building or during image runtime, else `false`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### NativeDetector

          public NativeDetector()

  - ### Method Detail

    - #### inNativeImage

          public static boolean inNativeImage()

      Returns `true` if invoked in the context of image building or during image runtime, else `false`.