Interface SourceGenerator

All Known Implementing Classes:
ByteCodeGenerator, GroovyPoetSourceGenerator, JavaPoetSourceGenerator

public interface SourceGenerator
Source code generator.
Since:
1.0
Author:
Denis Stepanov
  • Method Summary

    Modifier and Type
    Method
    Description
    io.micronaut.inject.visitor.VisitorContext.Language
     
    default void
    write(ObjectDef objectDef, io.micronaut.inject.visitor.VisitorContext context, io.micronaut.inject.ast.Element... originatingElements)
    Write the file using the context.
    void
    write(ObjectDef objectDef, Writer writer)
    Write the source code.
  • Method Details

    • getLanguage

      io.micronaut.inject.visitor.VisitorContext.Language getLanguage()
      Returns:
      The source language of the generator
    • write

      void write(ObjectDef objectDef, Writer writer) throws IOException
      Write the source code.
      Parameters:
      objectDef - The object definition
      writer - 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 write
      context - The context
      originatingElements - the originated elements
      Since:
      1.5