Polishing

This commit is contained in:
Juergen Hoeller
2022-10-06 12:03:25 +02:00
parent aedef9321a
commit b45a48461f
12 changed files with 71 additions and 100 deletions

View File

@@ -208,8 +208,7 @@ class ConfigurationClassEnhancer {
* Also exposes the application ClassLoader as thread context ClassLoader for the time of
* class generation (in order for ASM to pick it up when doing common superclass resolution).
*/
private static class BeanFactoryAwareGeneratorStrategy extends
ClassLoaderAwareGeneratorStrategy {
private static class BeanFactoryAwareGeneratorStrategy extends ClassLoaderAwareGeneratorStrategy {
public BeanFactoryAwareGeneratorStrategy(@Nullable ClassLoader classLoader) {
super(classLoader);

View File

@@ -61,8 +61,7 @@ public abstract class AotProcessor {
private final String artifactId;
/**
* Create a new instance.
*
* Create a new processor instance.
* @param application the application entry point
* @param sourceOutput the location of generated sources
* @param resourceOutput the location of generated resources
@@ -74,6 +73,7 @@ public abstract class AotProcessor {
*/
protected AotProcessor(Class<?> application, Path sourceOutput, Path resourceOutput,
Path classOutput, String groupId, String artifactId) {
this.application = application;
this.sourceOutput = sourceOutput;
this.resourceOutput = resourceOutput;
@@ -158,6 +158,7 @@ public abstract class AotProcessor {
private void registerEntryPointHint(DefaultGenerationContext generationContext,
ClassName generatedInitializerClassName) {
TypeReference generatedType = TypeReference.of(generatedInitializerClassName.canonicalName());
TypeReference applicationType = TypeReference.of(this.application);
ReflectionHints reflection = generationContext.getRuntimeHints().reflection();