Introduce TypeHint.Builder#onReachableType(Class<?>)

Closes gh-29017
This commit is contained in:
Sébastien Deleuze
2022-08-26 08:30:25 +02:00
parent 7671d29899
commit 08f636b691
6 changed files with 17 additions and 8 deletions

View File

@@ -38,8 +38,6 @@ class SchedulerFactoryBeanRuntimeHints implements RuntimeHintsRegistrar {
private static final String SCHEDULER_FACTORY_CLASS_NAME = "org.quartz.impl.StdSchedulerFactory";
private static final TypeReference FACTORY_BEAN_TYPE_REFERENCE = TypeReference.of(SchedulerFactoryBean.class);
private final ReflectiveRuntimeHintsRegistrar reflectiveRegistrar = new ReflectiveRuntimeHintsRegistrar();
@Override
@@ -49,7 +47,7 @@ class SchedulerFactoryBeanRuntimeHints implements RuntimeHintsRegistrar {
}
Consumer<Builder> typeHint = type -> type
.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS)
.onReachableType(FACTORY_BEAN_TYPE_REFERENCE);
.onReachableType(SchedulerFactoryBean.class);
hints.reflection()
.registerType(TypeReference.of(SCHEDULER_FACTORY_CLASS_NAME), typeHint)
.registerTypes(TypeReference.listOf(ResourceLoaderClassLoadHelper.class,