Package io.micronaut.aot.core.context
Class ApplicationContextAnalyzer
java.lang.Object
io.micronaut.aot.core.context.ApplicationContextAnalyzer
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 Summary
Modifier and TypeMethodDescriptionstatic ApplicationContextAnalyzer
create()
Instantiates an application context analyzer.static ApplicationContextAnalyzer
Instantiates an application context analyzer with the ability to customize the application context.Predicate<io.micronaut.core.annotation.AnnotationMetadataProvider>
Returns a predicate which can be used to determine, from annotation metadata, if a bean matches requirements.io.micronaut.context.ApplicationContext
-
Method Details
-
getEnvironmentNames
-
getApplicationContext
public io.micronaut.context.ApplicationContext getApplicationContext() -
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
-