TargetElement
@Retention(RUNTIME)
@Target({METHOD, CONSTRUCTOR, FIELD})
public @interface TargetElementSpecifies 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.
Elements2
String name()
name
since 22.3String 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.3Class< ?>[] 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}