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
  • Field Summary Link icon

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
  • Optional Element Summary Link icon

    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 Details Link icon

  • Element Details

    • name Link icon

      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 Link icon

      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}