Class ValidationExtensionProvider
- All Implemented Interfaces:
CodegenProvider,RegistryCodegenExtensionProvider
ServiceLoader provider implementation for
RegistryCodegenExtensionProvider that generates required
services to handle declarative validation.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate(RegistryCodegenContext codegenContext) Create a new extension based on the context.Annotations that are supported.Inherited annotations that are supported.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, supportedOptionsMethods inherited from interface io.helidon.service.codegen.spi.RegistryCodegenExtensionProvider
supportsFactoryProvidedServiceContractAnnotations
-
Constructor Details
-
ValidationExtensionProvider
public ValidationExtensionProvider()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:
-
supportedMetaAnnotations
Description copied from interface:CodegenProviderInherited annotations that are supported. If an annotation is annotated with this "meta" annotation, it is considered supported.- Specified by:
supportedMetaAnnotationsin interfaceCodegenProvider- Returns:
- set of meta 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:
codegenContext- injection code generation context- Returns:
- a new extension
-