Elide GraalVM25.6.0-elide.4
All types
Versions and modules

TargetElement

Javaannotation interfacein com.oracle.svm.core.annotatesince 22.3

@Retention(RUNTIME)
@Target({METHOD, CONSTRUCTOR, FIELD})
public @interface TargetElement

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

See TargetClass for an overview of the annotation system.

Fields1

String CONSTRUCTOR_NAMENo description.

CONSTRUCTOR_NAME

since 22.3
String CONSTRUCTOR_NAME

No description.

Value

String
Constant: "<init>"

Elements2

String name()

name

since 22.3
String name() default ""

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.

Returns

String
No description.

Default: ""

Class<?>[] onlyWith()

onlyWith

since 22.3
Class<?>[] onlyWith() default {com.oracle.svm.core.annotate.TargetClass.AlwaysIncluded.class}

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).

Returns

Class<?>[]
No description.

Default: {com.oracle.svm.core.annotate.TargetClass.AlwaysIncluded.class}