Class AbstractStaticServiceLoaderSourceGenerator

java.lang.Object
io.micronaut.aot.core.codegen.AbstractCodeGenerator
io.micronaut.aot.std.sourcegen.AbstractStaticServiceLoaderSourceGenerator
All Implemented Interfaces:
AOTCodeGenerator
Direct Known Subclasses:
JitStaticServiceLoaderSourceGenerator, NativeStaticServiceLoaderSourceGenerator

public abstract class AbstractStaticServiceLoaderSourceGenerator extends AbstractCodeGenerator
Base class for generation of service loader classes. Because service loading has a very different behavior in JIT (regular JVM) mode and native mode, we have dedicated implementations for both (see subclasses).
  • Field Details

  • Constructor Details

    • AbstractStaticServiceLoaderSourceGenerator

      public AbstractStaticServiceLoaderSourceGenerator()
  • Method Details

    • generate

      public void generate(@NonNull @NonNull AOTContext context)
    • generateFindAllMethod

      protected abstract void generateFindAllMethod(Stream<Class<?>> serviceClasses, String serviceName, Class<?> serviceType, com.squareup.javapoet.TypeSpec.Builder factory)