Class ScalaProcessingEngine

java.lang.Object
io.micronaut.scala.processing.visitor.ScalaProcessingEngine

public final class ScalaProcessingEngine extends Object
Executes Micronaut's visitor and bean-definition pipeline for Scala compiler data.
  • Constructor Details

    • ScalaProcessingEngine

      public ScalaProcessingEngine(File outputDirectory, Collection<File> classpath, Map<String,String> options, Function<String, ScalaAnnotationTypeData> annotationTypeResolver, Function<String, ScalaClassData> classpathClassResolver, BiConsumer<String,Object> infoReporter, BiConsumer<String,Object> warningReporter, BiConsumer<String,Object> errorReporter)
      Parameters:
      outputDirectory - The compiler class output directory
      classpath - The compilation classpath
      options - Micronaut processing options
      annotationTypeResolver - Resolves an annotation type by name, for annotations never seen on an extracted element
      classpathClassResolver - Resolves a Scala class the compiler read from the classpath by name, or null when the name is not one
      infoReporter - The info reporter
      warningReporter - The warning reporter
      errorReporter - The error reporter
  • Method Details

    • addClasses

      public void addClasses(Collection<ScalaClassData> classData)
      Adds classes observed by a Scala compiler phase.
      Parameters:
      classData - The classes
    • addDocumentation

      public void addDocumentation(Map<Object,String> comments)
      Adds the documentation comments found on a compilation unit's declarations.

      Separate from addClasses(Collection) because a comment is not part of the tree it documents: the compiler keeps them in a side table keyed by symbol, so they are collected alongside the model rather than inside it.

      Parameters:
      comments - The raw comments, keyed by the native compiler object they document
    • processTypeVisitors

      public void processTypeVisitors()
      Processes type element visitors once all source classes have been collected.
    • processBeanDefinitions

      public void processBeanDefinitions()
      Generates bean definitions for collected source classes.