Top Description Fields Methods
com.oracle.svm.core.annotate

public @Interface TargetElement

extends Annotation
Annotations
@Retention:RUNTIME
@Target:METHOD, CONSTRUCTOR, FIELD
@Platforms:HOSTED_ONLY
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target, java.util.function.BooleanSupplier, .Predicate, org.graalvm.nativeimage.Platform, .Platforms

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

See TargetClass for an overview of the annotation system.

Since
22.3

Field Summary

Modifier and TypeField and Description
public static final String

Method Summary

Modifier and TypeMethod and Description
public String
name()

The name of the field or method in the original class.

public Class<?>[]
onlyWith()

Substitute only if all provided predicates are true (default: unconditional substitution that is always included).

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString

Field Detail

CONSTRUCTOR_NAMEback to summary
public static final String CONSTRUCTOR_NAME
Since
22.3

Method Detail

nameback to summary
public String name()

The name of the field or method in the original class. If the default value is specified for this element, then the name of the annotated field or method is used.

To make a reference to a constructor, use the name CONSTRUCTOR_NAME.

Since
22.3
onlyWithback to summary
public Class<?>[] onlyWith()

Substitute only if all provided predicates are true (default: unconditional substitution that is always included). The classes must either implement BooleanSupplier or Predicate<Class> (the parameter for Predicate#test is the "original" class as specified by the TargetClass annotation, as a Class).

Since
22.3