Class FtExtensionProvider
- All Implemented Interfaces:
CodegenProvider,RegistryCodegenExtensionProvider
ServiceLoader provider implementation for
RegistryCodegenExtensionProvider that generates required
services to handle declarative Fault tolerance.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(RegistryCodegenContext codegenContext) Create a new extension based on the context.Annotations that are supported.booleanWhether this extension should also process factory services whose provided service contracts contain annotations supported by this extension.booleanWhether this extension should also process services whose service contracts contain annotations supported by this extension.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.helidon.codegen.spi.CodegenProvider
supportedAnnotationPackages, supportedMetaAnnotations, supportedOptions
-
Constructor Details
-
FtExtensionProvider
public FtExtensionProvider()Default constructor required by JavaServiceLoader.
-
-
Method Details
-
supportedAnnotations
Description copied from interface:CodegenProviderAnnotations that are supported.- Specified by:
supportedAnnotationsin interfaceCodegenProvider- Returns:
- set of annotation types
- See Also:
-
supportsServiceContractAnnotations
public boolean supportsServiceContractAnnotations()Description copied from interface:RegistryCodegenExtensionProviderWhether this extension should also process services whose service contracts contain annotations supported by this extension.Service contracts include contracts discovered for the service type. 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(). Factory-provided contracts are controlled separately byRegistryCodegenExtensionProvider.supportsFactoryProvidedServiceContractAnnotations().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.- Specified by:
supportsServiceContractAnnotationsin interfaceRegistryCodegenExtensionProvider- Returns:
- whether services with supported service-contract annotations should be processed
-
supportsFactoryProvidedServiceContractAnnotations
public boolean supportsFactoryProvidedServiceContractAnnotations()Description copied from interface:RegistryCodegenExtensionProviderWhether this extension should also process factory services whose provided service contracts contain annotations supported by this extension.This method follows
RegistryCodegenExtensionProvider.supportsServiceContractAnnotations()by default for backward compatibility.- Specified by:
supportsFactoryProvidedServiceContractAnnotationsin interfaceRegistryCodegenExtensionProvider- Returns:
- whether factory services with supported provided-contract annotations should be processed
-
create
Description copied from interface:RegistryCodegenExtensionProviderCreate a new extension based on the context.- Specified by:
createin interfaceRegistryCodegenExtensionProvider- Parameters:
codegenContext- injection code generation context- Returns:
- a new extension
-