Package io.micronaut.aot.std.sourcegen
Class NativeStaticServiceLoaderSourceGenerator
java.lang.Object
io.micronaut.aot.core.codegen.AbstractCodeGenerator
io.micronaut.aot.std.sourcegen.AbstractStaticServiceLoaderSourceGenerator
io.micronaut.aot.std.sourcegen.NativeStaticServiceLoaderSourceGenerator
- All Implemented Interfaces:
AOTCodeGenerator
public class NativeStaticServiceLoaderSourceGenerator
extends AbstractStaticServiceLoaderSourceGenerator
A specialized version of service loader generation which is aimed at
executing in native images, where classloading is basically free.
-
Field Summary
Fields inherited from class io.micronaut.aot.std.sourcegen.AbstractStaticServiceLoaderSourceGenerator
context, DEFAULT_SERVICE_TYPES, DEFAULT_SERVICE_TYPES_LIST, DESCRIPTION, FORCE_INCLUDE, REJECTED_CLASSES, SERVICE_LOADING_CATEGORY, SERVICE_TYPES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected final void
generateFindAllMethod
(Stream<Class<?>> serviceClasses, String serviceName, Class<?> serviceType, com.squareup.javapoet.TypeSpec.Builder factory) Methods inherited from class io.micronaut.aot.std.sourcegen.AbstractStaticServiceLoaderSourceGenerator
generate
Methods inherited from class io.micronaut.aot.core.codegen.AbstractCodeGenerator
simpleNameOf, staticMethod, staticMethodBuilder
-
Field Details
-
ID
- See Also:
-
-
Constructor Details
-
NativeStaticServiceLoaderSourceGenerator
public NativeStaticServiceLoaderSourceGenerator()
-
-
Method Details
-
generateFindAllMethod
protected final void generateFindAllMethod(Stream<Class<?>> serviceClasses, String serviceName, Class<?> serviceType, com.squareup.javapoet.TypeSpec.Builder factory) - Specified by:
generateFindAllMethod
in classAbstractStaticServiceLoaderSourceGenerator
-