---
title: "Inject"
description: "Injects the annotated field into the TargetClass."
kind: "annotation interface"
id: "com.oracle.svm.core.annotate.Inject"
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/Inject.html"
---

# @ Inject

[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 Inject
```

Injects the annotated field into the [`TargetClass`](TargetClass.md). The field must not be declared static. If instances of the target class are in the image heap, the field also needs to be annotated with [`RecomputeFieldValue`](RecomputeFieldValue.md) to provide a value for the injected field.
