Class ApplicationContextAnalyzer

java.lang.Object
io.micronaut.aot.core.context.ApplicationContextAnalyzer

public final class ApplicationContextAnalyzer extends Object
An application context analyzer is responsible for instantiating an application context and inferring whether a bean should be included in the application binaries. It uses a Predicate<Object> as superinterface because it needs to run in the same classloader as the optimizer, where the Micronaut specific types are different from the ones loaded in the analyzed classpath.
  • Method Details

    • getEnvironmentNames

      public Set<String> getEnvironmentNames()
    • getApplicationContext

      public io.micronaut.context.ApplicationContext getApplicationContext()
    • create

      public static ApplicationContextAnalyzer create()
      Instantiates an application context analyzer.
      Returns:
      an analyzer
    • create

      public static ApplicationContextAnalyzer create(Consumer<? super io.micronaut.context.ApplicationContextBuilder> spec)
      Instantiates an application context analyzer with the ability to customize the application context.
      Parameters:
      spec - the spec to configure the application context
      Returns:
      the analyzer
    • getAnnotationMetadataPredicate

      public Predicate<io.micronaut.core.annotation.AnnotationMetadataProvider> getAnnotationMetadataPredicate()
      Returns a predicate which can be used to determine, from annotation metadata, if a bean matches requirements.
      Returns:
      a predicate