Class ReflectiveProcessorAotContributionBuilder
java.lang.Object
org.springframework.context.aot.ReflectiveProcessorAotContributionBuilder
Builder for an AOT
 contribution that detects the presence of 
@Reflective on
 annotated elements and invoke the underlying ReflectiveProcessor
 implementations.
 Candidates can be provided explicitly or by scanning the classpath.
- Since:
- 6.2
- Author:
- Stephane Nicoll
- See Also:
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()scan(@Nullable ClassLoader classLoader, String... packageNames) Scan the givenpackageNamesand their sub-packages for classes that usesReflective.withClasses(Class<?>[] classes) Process the given classes by checking the ones that useReflective.withClasses(Iterable<Class<?>> classes) Process the given classes by checking the ones that useReflective.
- 
Constructor Details- 
ReflectiveProcessorAotContributionBuilderpublic ReflectiveProcessorAotContributionBuilder()
 
- 
- 
Method Details- 
withClassesProcess the given classes by checking the ones that useReflective.A class is candidate if it uses Reflectivedirectly or via a meta-annotation. Type, fields, constructors, methods and enclosed types are inspected.- Parameters:
- classes- the classes to inspect
 
- 
withClassesProcess the given classes by checking the ones that useReflective.A class is candidate if it uses Reflectivedirectly or via a meta-annotation. Type, fields, constructors, methods and enclosed types are inspected.- Parameters:
- classes- the classes to inspect
 
- 
scanpublic ReflectiveProcessorAotContributionBuilder scan(@Nullable ClassLoader classLoader, String... packageNames) Scan the givenpackageNamesand their sub-packages for classes that usesReflective.This performs a "deep scan" by loading every class in the specified packages and search for Reflectiveon types, constructors, methods, and fields. Enclosed classes are candidates as well. Classes that fail to load are ignored.- Parameters:
- classLoader- the classloader to use
- packageNames- the package names to scan
 
- 
build
 
-