io.quarkiverse.poi.runtime.graal.POIFeature Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of quarkus-poi Show documentation
Show all versions of quarkus-poi Show documentation
Read and write files in Microsoft Office formats, such as Word, Excel and PowerPoint
package io.quarkiverse.poi.runtime.graal;
import org.graalvm.nativeimage.ImageSingletons;
import org.graalvm.nativeimage.hosted.Feature;
import org.graalvm.nativeimage.impl.RuntimeClassInitializationSupport;
public class POIFeature implements Feature {
@Override
public void afterRegistration(AfterRegistrationAccess access) {
final RuntimeClassInitializationSupport runtimeInit = ImageSingletons.lookup(RuntimeClassInitializationSupport.class);
final String reason = "Quarkus run time init for Apache POI";
runtimeInit.initializeAtRunTime("org.apache.poi.hssf.util", reason);
runtimeInit.initializeAtRunTime("org.apache.poi.ss.format", reason);
runtimeInit.initializeAtRunTime("org.apache.poi.util.RandomSingleton", reason);
runtimeInit.initializeAtRunTime("org.apache.poi.ss.util.SheetUtil", reason);
}
@Override
public String getDescription() {
return "Quarkus runtime initialization for Apache POI";
}
}