Class ScalaProcessingEngine
java.lang.Object
io.micronaut.scala.processing.visitor.ScalaProcessingEngine
Executes Micronaut's visitor and bean-definition pipeline for Scala compiler data.
-
Constructor Summary
ConstructorsConstructorDescriptionScalaProcessingEngine(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) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddClasses(Collection<ScalaClassData> classData) Adds classes observed by a Scala compiler phase.voidaddDocumentation(Map<Object, String> comments) Adds the documentation comments found on a compilation unit's declarations.voidGenerates bean definitions for collected source classes.voidProcesses type element visitors once all source classes have been collected.
-
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 directoryclasspath- The compilation classpathoptions- Micronaut processing optionsannotationTypeResolver- Resolves an annotation type by name, for annotations never seen on an extracted elementclasspathClassResolver- Resolves a Scala class the compiler read from the classpath by name, ornullwhen the name is not oneinfoReporter- The info reporterwarningReporter- The warning reportererrorReporter- The error reporter
-
-
Method Details
-
addClasses
Adds classes observed by a Scala compiler phase.- Parameters:
classData- The classes
-
addDocumentation
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.
-