- All Superinterfaces:
RoundContext
Context of a single round of code generation.
For example the first round may generate types, that require additional code generation.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addDescriptor
(TypeName serviceType, TypeName descriptorType, ClassModel.Builder descriptor, double weight, Set<ResolvedType> contracts, Set<ResolvedType> factoryContracts, Object... originatingElements) Add a new service descriptor.serviceContracts
(TypeInfo serviceInfo) Create service contracts for the provided service that honor configuration of contract discovery.Methods inherited from interface io.helidon.codegen.RoundContext
addGeneratedType, annotatedAnnotations, annotatedElements, annotatedTypes, availableAnnotations, generatedType, modules, typeInfo, types
-
Method Details
-
addDescriptor
void addDescriptor(TypeName serviceType, TypeName descriptorType, ClassModel.Builder descriptor, double weight, Set<ResolvedType> contracts, Set<ResolvedType> factoryContracts, Object... originatingElements) Add a new service descriptor.- Parameters:
serviceType
- type of the service (the implementation class we generate descriptor for)descriptorType
- type of the service descriptordescriptor
- descriptor class modelweight
- weight of this service descriptorcontracts
- contracts of this service descriptorfactoryContracts
- contracts of the service class if it is a factoryoriginatingElements
- possible originating elements (such as Element in APT, or ClassInfo in classpath scanning)- Throws:
IllegalStateException
- if an attempt is done to register a new descriptor for the same type
-
serviceContracts
Create service contracts for the provided service that honor configuration of contract discovery.- Parameters:
serviceInfo
- type info of the analyzed service- Returns:
- service contracts
-