Annotation Interface Option.PrototypedBy

Enclosing class:
Option

@Target(METHOD) @Retention(CLASS) public static @interface Option.PrototypedBy
An option may return a type that is not under our control, yet we have a prototype that can be used to create it. Such a prototype can be referenced through this annotation, so we use it for builder consumer, to add a builder method with it as a parameter, and to use it in config method if it is configured.

IMPORTANT: the referenced prototype build method must return the type returned by this option

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Type of the prototype that is a factory of the type returned by the annotated method.
  • Element Details

    • value

      String value
      Type of the prototype that is a factory of the type returned by the annotated method. If the type is in the same package as the type of the annotated method, class name is sufficient, otherwise a fully qualified name must be used.
      Returns:
      prototype class that builds the type of the annotated option