Class OpenApiExtensionProvider
- All Implemented Interfaces:
CodegenProvider, RegistryCodegenExtensionProvider
ServiceLoader provider implementation for declarative OpenAPI code generation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionCreate a new extension based on the context.Annotations that are supported.booleanWhether this extension should also process services whose service contracts contain annotations supported by this extension.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CodegenProvider
supportedAnnotationPackages, supportedMetaAnnotations, supportedOptionsModifier and TypeMethodDescriptionSupported packages of annotations.Inherited annotations that are supported.Configuration options that are supported.Methods inherited from interface RegistryCodegenExtensionProvider
supportsFactoryProvidedServiceContractAnnotationsModifier and TypeMethodDescriptiondefault booleanWhether this extension should also process factory services whose provided service contracts contain annotations supported by this extension.
-
Constructor Details
-
OpenApiExtensionProvider
public OpenApiExtensionProvider()Required public constructor forServiceLoader.
-
-
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
-
create
Description copied from interface:RegistryCodegenExtensionProviderCreate a new extension based on the context.- Specified by:
createin interfaceRegistryCodegenExtensionProvider- Parameters:
ctx- injection code generation context- Returns:
- a new extension
-