Package com.oracle.svm.core.annotate
Annotation Interface RecomputeFieldValue
Supported API is available to replace this non-API annotation: Use
Feature.BeforeAnalysisAccess.registerFieldValueTransformer(java.lang.reflect.Field, org.graalvm.nativeimage.hosted.FieldValueTransformer)
.
Mechanism to change the value of a field. Normally, field values in the native image heap of the
Substrate VM are just taken from the host VM. This annotation allows the field value to be
intercepted and recomputed.
This annotation must be used on a field also annotated with Alias
to specify the field
whose value needs to be changed.
- Since:
- 22.3
-
Nested Class Summary
-
Required Element Summary
Modifier and TypeRequired ElementDescriptionThe kind of the recomputation performed. -
Optional Element Summary
Modifier and TypeOptional ElementDescriptionClass
<?> The class parameter for the recomputation.The class parameter for the recomputation.boolean
Treat the value as final, to enforce constant folding already during static analysis.The name parameter for the recomputation.
-
Element Details
-
kind
The kind of the recomputation performed.- Since:
- 22.3
-
declClass
Class<?> declClassThe class parameter for the recomputation. If this attribute is not specified, then the class specified bydeclClassName()
is used. If neitherdeclClass()
nordeclClassName()
is specified, then the class specified by theTargetClass
annotation is used.- Since:
- 22.3
- Default:
com.oracle.svm.core.annotate.RecomputeFieldValue.class
-
declClassName
String declClassNameThe class parameter for the recomputation. If this attribute is not specified, then the class specified bydeclClass()
is used. If neitherdeclClass()
nordeclClassName()
is specified, then the class specified by theTargetClass
annotation is used.- Since:
- 22.3
- Default:
""
-
name
String nameThe name parameter for the recomputation.- Since:
- 22.3
- Default:
""
-
isFinal
boolean isFinalTreat the value as final, to enforce constant folding already during static analysis.- Since:
- 22.3
- Default:
false
-