Annotation Interface Prototype.RegistrySupport

Enclosing class:
Prototype

@Target(TYPE) @Retention(CLASS) public static @interface Prototype.RegistrySupport
Generate support for Service Registry (helidon-service-registry) for any option that is annotated as Option.Provider. When enabled (i.e. when this annotation is present), the service registry would be used to discover any service implementations including implementations discovered by service loader - appropriate service.loader metadata file will be generated for the service provider interfaces.

Simply add this annotation to your Prototype.Blueprint type to enable service registry. If this annotation is not present, registry support is inherited from the nearest parent blueprint or prototype. If no parent enables registry support, ServiceLoader is used instead. An explicit value of false disables registry discovery for provider options declared by the annotated blueprint, without removing registry support already owned by its parent builder.

When using this annotation, you cannot use serviceRegistry as a custom option in your blueprint, as it will be added by the annotation processor, to allow customization of the registry instance.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Whether to enable (default) or disable (set to false) registry support for this blueprint.
  • Element Details

    • value

      boolean value
      Whether to enable (default) or disable (set to false) registry support for this blueprint.
      Returns:
      whether the registry support should be enabled
      Default:
      true