Top Description Annotations
module nativeimage

Package com.oracle.svm.core.annotate


This package contains annotations that configure the substitution mechanism of GraalVM Native Image. Annotated classes and methods modify the behavior of the class referenced by com.oracle.svm.core.annotate.TargetClass.

Important Note

this package is not part of the supported API. It exists, and is exported in the module descriptor, for compatibility reasons only.

Since
22.3

Annotation Summary

Modifier and TypeAnnotation and Description
public @interface
Alias

Mechanism for referring to fields and methods otherwise inaccessible due to Java language access control rules.

public @interface
AnnotateOriginal

This annotation allows to add additional annotations to existing methods but keep the implementation as it is.

public @interface
AutomaticFeature

Deprecated for removal.
Supported API is available to replace this non-API annotation: Instead of using this annotation, use --features=fully.qualified.name.of.FeatureClass in the Args of a native-image.properties file to ensure a user-provided feature gets processed.
public @interface
Delete

Mechanism to ensures that an element is not used.

public @interface
Inject

Injects the annotated field into the TargetClass.

public @interface
InjectAccessors

Inject accessor methods for the field denoted using an Alias annotation.

public @interface
KeepOriginal

If a class annotated with TargetClass is also annotated with Substitute, all non-substituted methods in that class are by default treated as deleted.

public @interface
RecomputeFieldValue

Supported API is available to replace this non-API annotation: Use BeforeAnalysisAccess#registerFieldValueTransformer.

public @interface
Substitute

When used to annotate a method, it indicates that a method declaration is intended to be a substitute for a method declaration in another class.

public @interface
TargetClass

A class annotated with this annotation denotes a class that modifies methods of fields of another class, called the "original" class.

public @interface
TargetElement

Specifies additional properties for an element also annotated with Alias, Delete, Substitute, AnnotateOriginal, or KeepOriginal.