Top Description Fields Constructors Methods
org.springframework.aot.nativex.feature

pack-priv Class PreComputeFieldFeature

extends Object
implements Feature
Class Inheritance
All Implemented Interfaces
org.graalvm.nativeimage.hosted.Feature
Imports
java.lang.reflect.Field, .Modifier, java.util.regex.Pattern, org.graalvm.nativeimage.hosted.Feature

GraalVM Feature that substitutes boolean field values that match a certain pattern with values pre-computed AOT without causing class build-time initialization.

It is possible to pass

-Dspring.native.precompute.log=verbose
as a
native-image
compiler build argument to display detailed logs about pre-computed fields.

Authors
Sebastien Deleuze, Phillip Webb
Since
6.0

Field Summary

Modifier and TypeField and Description
private static final Pattern[]
private final ThrowawayClassLoader
private static final boolean

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
beforeAnalysis(Feature.BeforeAnalysisAccess
The supported operations that the feature can perform at this time
access
)

Overrides default org.graalvm.nativeimage.hosted.Feature.beforeAnalysis.

Handler for initializations before the static analysis.
private void
private Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

patternsback to summary
private static final Pattern[] patterns
throwawayClassLoaderback to summary
private final ThrowawayClassLoader throwawayClassLoader
verboseback to summary
private static final boolean verbose

Constructor Detail

PreComputeFieldFeatureback to summary
pack-priv PreComputeFieldFeature()

Method Detail

beforeAnalysisback to summary
public void beforeAnalysis(Feature.BeforeAnalysisAccess access)

Overrides default org.graalvm.nativeimage.hosted.Feature.beforeAnalysis.

Doc from org.graalvm.nativeimage.hosted.Feature.beforeAnalysis.

Handler for initializations before the static analysis.

Parameters
access:Feature.BeforeAnalysisAccess

The supported operations that the feature can perform at this time

Annotations
@Override
iterateFieldsback to summary
private void iterateFields(Feature.DuringAnalysisAccess access, Class<?> subtype)
provideFieldValueback to summary
private Object provideFieldValue(Field field) throws ClassNotFoundException, NoSuchFieldException, IllegalAccessException