Interface RegistryCodegenExtensionProvider

All Superinterfaces:
CodegenProvider
All Known Implementing Classes:
CorsExtensionProvider, EventObserverExtensionProvider, FtExtensionProvider, MetricsExtensionProvider, RestClientExtensionProvider, RestServerExtensionProvider, SchedulingExtensionProvider, ServiceExtensionProvider, TracingExtensionProvider, ValidationExtensionProvider, WebSocketClientExtensionProvider, WebSocketServerExtensionProvider

public interface RegistryCodegenExtensionProvider extends CodegenProvider
A ServiceLoader provider interface for extensions of code generators for Helidon Service Registry. The difference between this extension and a general CodegenExtensionProvider is that this provider has access to RegistryCodegenContext.
  • Method Details

    • supportsServiceContractAnnotations

      default boolean supportsServiceContractAnnotations()
      Whether this extension should also process services whose service contracts contain annotations supported by this extension.

      Service contracts include direct service contracts and contracts provided by factory services. Contract annotations are discovered from nested contract metadata, including annotations on the contract type, methods, method parameters, parameter and return type arguments, and annotations matched through CodegenProvider.supportedMetaAnnotations().

      Matching services are passed to the extension through RoundContext.types().

      Contract annotations do not make the implementation itself appear from RoundContext.annotatedTypes(io.helidon.common.types.TypeName) unless the implementation also has that annotation directly or through normal annotation inheritance.

      Returns:
      whether services with supported service-contract annotations should be processed
    • create

      Create a new extension based on the context.
      Parameters:
      codegenContext - injection code generation context
      Returns:
      a new extension