Package com.oracle.svm.core.annotate
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
TargetClass
.
Important: 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
-
ClassDescriptionMechanism for referring to fields and methods otherwise inaccessible due to Java language access control rules.This annotation allows to add additional annotations to existing methods but keep the implementation as it is.Deprecated, for removal: This API element is subject to removal in a future version.Mechanism to ensures that an element is not used.Injects the annotated field into the
TargetClass
.Inject accessor methods for the field denoted using anAlias
annotation.If a class annotated withTargetClass
is also annotated withSubstitute
, all non-substituted methods in that class are by default treated asdeleted
.Supported API is available to replace this non-API annotation: UseFeature.BeforeAnalysisAccess.registerFieldValueTransformer(java.lang.reflect.Field, org.graalvm.nativeimage.hosted.FieldValueTransformer)
.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.A class annotated with this annotation denotes a class that modifies methods of fields of another class, called the "original" class.The default value for theTargetClass.onlyWith()
attribute.Marker value forTargetClass.classLoader()
that no custom classloader should be used.Marker value forTargetClass.classNameProvider()
that no class name provider should be used.Specifies additional properties for an element also annotated withAlias
,Delete
,Substitute
,AnnotateOriginal
, orKeepOriginal
.