Class AllowsReflectionRemapper
java.lang.Object
io.micronaut.langchain4j.processor.AllowsReflectionRemapper
- All Implemented Interfaces:
io.micronaut.inject.annotation.AnnotationRemapper
- Direct Known Subclasses:
AllowsReflectionRemapper.Agentic, AllowsReflectionRemapper.AgenticDeclarative, AllowsReflectionRemapper.AiServices, AllowsReflectionRemapper.StructuredOutputs, AllowsReflectionRemapper.Tools
@Internal
public abstract sealed class AllowsReflectionRemapper
extends Object
implements io.micronaut.inject.annotation.AnnotationRemapper
permits AllowsReflectionRemapper.AiServices, AllowsReflectionRemapper.Agentic, AllowsReflectionRemapper.AgenticDeclarative, AllowsReflectionRemapper.Tools, AllowsReflectionRemapper.StructuredOutputs
Adds the
AllowsReflection stereotype to the LangChain4j annotations that LangChain4j reads
reflectively from the Java class (@SystemMessage, @UserMessage, @V, @Agent,
@SequenceAgent, @Description, ...), so that a compiler generating the Java class for a
declaration written in another language (the Python compiler) copies them onto the generated class without
the user declaring @AllowsReflection or the micronaut.introspection.allow-reflection option.
An AnnotationRemapper applies to the annotations of exactly one package: a subclass is registered
per package.
- Since:
- 2.4.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThe@Agentannotation.static final classThe declarative agentic annotations:@SequenceAgent,@ParallelAgent,@Output, ...static final classThe annotations of AI services:@SystemMessage,@UserMessage,@V,@MemoryId, ...static final classThe@Descriptionannotation of the structured outputs.static final classThe tool annotations:@Tool,@P,@ToolMemoryId, ... -
Field Summary
Fields inherited from interface io.micronaut.inject.annotation.AnnotationRemapper
ALL_PACKAGES -
Method Summary
-
Method Details
-
getPackageName
- Specified by:
getPackageNamein interfaceio.micronaut.inject.annotation.AnnotationRemapper
-
remap
public final List<io.micronaut.core.annotation.AnnotationValue<?>> remap(io.micronaut.core.annotation.AnnotationValue<?> annotation, io.micronaut.inject.visitor.VisitorContext visitorContext) - Specified by:
remapin interfaceio.micronaut.inject.annotation.AnnotationRemapper
-