Class CaffeineFeature

java.lang.Object
io.micronaut.cache.caffeine.graal.CaffeineFeature
All Implemented Interfaces:
org.graalvm.nativeimage.hosted.Feature

@Internal public class CaffeineFeature extends Object implements org.graalvm.nativeimage.hosted.Feature
A native image feature that configures Caffeine for reflection.

Caffeine generates a class for each kind of cache and cache entry, such as SSLA or PSW, and picks one of them by name from the configuration of the cache. It then reads the static FACTORY field of the class with a VarHandle or looks up its constructor, and the class looks up its own fields with VarHandles. Since the configuration is only known at runtime, every generated class of Caffeine is registered.

Since:
4.0.0
Author:
Tim Yates
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.graalvm.nativeimage.hosted.Feature

    org.graalvm.nativeimage.hosted.Feature.AfterAnalysisAccess, org.graalvm.nativeimage.hosted.Feature.AfterCompilationAccess, org.graalvm.nativeimage.hosted.Feature.AfterHeapLayoutAccess, org.graalvm.nativeimage.hosted.Feature.AfterImageWriteAccess, org.graalvm.nativeimage.hosted.Feature.AfterRegistrationAccess, org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess, org.graalvm.nativeimage.hosted.Feature.BeforeCompilationAccess, org.graalvm.nativeimage.hosted.Feature.BeforeHeapLayoutAccess, org.graalvm.nativeimage.hosted.Feature.BeforeImageWriteAccess, org.graalvm.nativeimage.hosted.Feature.BeforeUniverseBuildingAccess, org.graalvm.nativeimage.hosted.Feature.CompilationAccess, org.graalvm.nativeimage.hosted.Feature.DuringAnalysisAccess, org.graalvm.nativeimage.hosted.Feature.DuringSetupAccess, org.graalvm.nativeimage.hosted.Feature.FeatureAccess, org.graalvm.nativeimage.hosted.Feature.IsInConfigurationAccess, org.graalvm.nativeimage.hosted.Feature.OnAnalysisExitAccess, org.graalvm.nativeimage.hosted.Feature.QueryReachabilityAccess
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    beforeAnalysis(org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess access)
     
     

    Methods inherited from class Object

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

    Methods inherited from interface org.graalvm.nativeimage.hosted.Feature

    afterAnalysis, afterCompilation, afterHeapLayout, afterImageWrite, afterRegistration, beforeCompilation, beforeHeapLayout, beforeImageWrite, beforeUniverseBuilding, cleanup, duringAnalysis, duringSetup, getRequiredFeatures, getURL, isInConfiguration, onAnalysisExit
  • Constructor Details

    • CaffeineFeature

      public CaffeineFeature()
  • Method Details

    • getDescription

      public String getDescription()
      Specified by:
      getDescription in interface org.graalvm.nativeimage.hosted.Feature
    • beforeAnalysis

      public void beforeAnalysis(org.graalvm.nativeimage.hosted.Feature.BeforeAnalysisAccess access)
      Specified by:
      beforeAnalysis in interface org.graalvm.nativeimage.hosted.Feature