Package io.micronaut.sourcegen.generator
Interface SourceGenerator
- All Known Implementing Classes:
ByteCodeGenerator
,GroovyPoetSourceGenerator
,JavaPoetSourceGenerator
public interface SourceGenerator
Source code generator.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Method Summary
-
Method Details
-
getLanguage
io.micronaut.inject.visitor.VisitorContext.Language getLanguage()- Returns:
- The source language of the generator
-
write
Write the source code.- Parameters:
objectDef
- The object definitionwriter
- The writer- Throws:
IOException
- The IO exception
-
write
default void write(ObjectDef objectDef, io.micronaut.inject.visitor.VisitorContext context, io.micronaut.inject.ast.Element... originatingElements) Write the file using the context.- Parameters:
objectDef
- The object to writecontext
- The contextoriginatingElements
- the originated elements- Since:
- 1.5
-