---
title: "RecomputeFieldValue"
description: "Supported API is available to replace this non-API annotation: Use BeforeAnalysisAccess.registerFieldValueTransformer."
kind: "annotation interface"
id: "com.oracle.svm.core.annotate.RecomputeFieldValue"
module: "nativeimage"
version: "25.6.0-elide.4"
canonical: "https://graalvm.elide.help/25.6.0-elide.4/api/nativeimage/com/oracle/svm/core/annotate/RecomputeFieldValue.html"
---

# @ RecomputeFieldValue

[nativeimage](../../../../../index.md) › [com.oracle.svm.core.annotate](index.md) · Every page: [llms.txt](../../../../../llms.txt)

Annotation interface in [`com.oracle.svm.core.annotate`](index.md). Since 22.3.

```java
@Retention(RUNTIME)
@Target({FIELD})
public @interface RecomputeFieldValue
```

Supported API is available to replace this non-API annotation: Use [`BeforeAnalysisAccess.registerFieldValueTransformer`](../../../../../org/graalvm/nativeimage/hosted/Feature.BeforeAnalysisAccess.md#registerFieldValueTransformer%28java.lang.reflect.Field,org.graalvm.nativeimage.hosted.FieldValueTransformer%29). 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`](Alias.md) to specify the field whose value needs to be changed.

## Nested types

- [`RecomputeFieldValue.Kind`](RecomputeFieldValue.Kind.md) (enum class): No description.

## Elements

### kind()
<a id="kind()"></a>`RecomputeFieldValue.Kind kind()`. Since 22.3. The kind of the recomputation performed. Cite: `com/oracle/svm/core/annotate/RecomputeFieldValue.html#kind()`

### declClass()
<a id="declClass()"></a>`Class<?> declClass() default com.oracle.svm.core.annotate.RecomputeFieldValue.class`. Since 22.3. The class parameter for the recomputation. If this attribute is not specified, then the class specified by `declClassName()` is used. If neither `declClass()` nor `declClassName()` is specified, then the class specified by the `TargetClass` annotation is used. Default: `com.oracle.svm.core.annotate.RecomputeFieldValue.class`. Cite: `com/oracle/svm/core/annotate/RecomputeFieldValue.html#declClass()`

### declClassName()
<a id="declClassName()"></a>`String declClassName() default ""`. Since 22.3. The class parameter for the recomputation. If this attribute is not specified, then the class specified by `declClass()` is used. If neither `declClass()` nor `declClassName()` is specified, then the class specified by the `TargetClass` annotation is used. Default: `""`. Cite: `com/oracle/svm/core/annotate/RecomputeFieldValue.html#declClassName()`

### name()
<a id="name()"></a>`String name() default ""`. Since 22.3. The name parameter for the recomputation. Default: `""`. Cite: `com/oracle/svm/core/annotate/RecomputeFieldValue.html#name()`

### isFinal()
<a id="isFinal()"></a>`boolean isFinal() default false`. Since 22.3. Treat the value as final, to enforce constant folding already during static analysis. Default: `false`. Cite: `com/oracle/svm/core/annotate/RecomputeFieldValue.html#isFinal()`
