Interface RegistryRoundContext

All Superinterfaces:
RoundContext

public interface RegistryRoundContext extends RoundContext
Context of a single round of code generation. For example the first round may generate types, that require additional code generation.
  • 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 descriptor
      descriptor - descriptor class model
      weight - weight of this service descriptor
      contracts - contracts of this service descriptor
      factoryContracts - contracts of the service class if it is a factory
      originatingElements - 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

      ServiceContracts serviceContracts(TypeInfo serviceInfo)
      Create service contracts for the provided service that honor configuration of contract discovery.
      Parameters:
      serviceInfo - type info of the analyzed service
      Returns:
      service contracts