Class ByteCodeGenerator

java.lang.Object
io.micronaut.sourcegen.generator.bytecode.ByteCodeGenerator
All Implemented Interfaces:
SourceGenerator

public final class ByteCodeGenerator extends Object implements SourceGenerator
Generates the classes directly by writing the bytecode.
Since:
1.5
Author:
Denis Stepanov
  • Constructor Details

    • ByteCodeGenerator

      public ByteCodeGenerator()
  • Method Details

    • getLanguage

      public io.micronaut.inject.visitor.VisitorContext.Language getLanguage()
      Specified by:
      getLanguage in interface SourceGenerator
      Returns:
      The source language of the generator
    • write

      public void write(ObjectDef objectDef, Writer writer)
      Description copied from interface: SourceGenerator
      Write the source code.
      Specified by:
      write in interface SourceGenerator
      Parameters:
      objectDef - The object definition
      writer - The writer
    • write

      public void write(ObjectDef objectDef, io.micronaut.inject.visitor.VisitorContext context, io.micronaut.inject.ast.Element... originatingElements)
      Description copied from interface: SourceGenerator
      Write the file using the context.
      Specified by:
      write in interface SourceGenerator
      Parameters:
      objectDef - The object to write
      context - The context
      originatingElements - the originated elements