Annotation Interface TargetElement


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

Since:
22.3
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    The name of the field or method in the original class.
    Class<?>[]
    Substitute only if all provided predicates are true (default: unconditional substitution that is always included).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Field Details

  • Element Details

    • name

      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
      Default:
      ""
    • onlyWith

      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(T) is the "original" class as specified by the TargetClass annotation, as a Class).
      Since:
      22.3
      Default:
      {com.oracle.svm.core.annotate.TargetClass.AlwaysIncluded.class}