Class ForeignFunctionMemoryApiNotes

java.lang.Object
net.jrodolfo.java_evolution.java22.ForeignFunctionMemoryApiNotes

public class ForeignFunctionMemoryApiNotes extends Object
Explains the Foreign Function and Memory API, finalized in Java 22.

JNI has long allowed Java to call native code, but it is complex and easy to make unsafe. The Foreign Function and Memory API provides a supported Java-level model for native calls and off-heap memory access.

This repository keeps the feature as notes because a realistic native example would require platform-specific libraries or setup.

  • Constructor Details

    • ForeignFunctionMemoryApiNotes

      public ForeignFunctionMemoryApiNotes()
  • Method Details

    • purpose

      public String purpose()
      Explains the high-level goal.
      Returns:
      a short explanation
    • replacesManyUseCasesFor

      public String replacesManyUseCasesFor()
      Names the older technology this API can replace for many use cases.
      Returns:
      older technology name
    • projectDecision

      public String projectDecision()
      Explains why this repository avoids a live native example.
      Returns:
      the project decision