Harmonize RuntimeHintsRegistrar implementations

Closes gh-28801
This commit is contained in:
Stephane Nicoll
2022-07-12 18:26:10 +02:00
parent 44d7e2775f
commit 2c92d7da8f
26 changed files with 76 additions and 121 deletions

View File

@@ -30,7 +30,7 @@ import org.springframework.lang.Nullable;
* @author Phillip Webb
* @since 6.0
*/
class CoreAnnotationsRuntimeHintsRegistrar implements RuntimeHintsRegistrar {
class CoreAnnotationsRuntimeHints implements RuntimeHintsRegistrar {
@Override
public void registerHints(RuntimeHints hints, @Nullable ClassLoader classLoader) {

View File

@@ -40,7 +40,7 @@ import org.springframework.util.ClassUtils;
* @since 6.0
* @see SpringFactoriesLoader
*/
class SpringFactoriesLoaderRuntimeHintsRegistrar implements RuntimeHintsRegistrar {
class SpringFactoriesLoaderRuntimeHints implements RuntimeHintsRegistrar {
private static final List<String> RESOURCE_LOCATIONS =
List.of(SpringFactoriesLoader.FACTORIES_RESOURCE_LOCATION);
@@ -48,7 +48,7 @@ class SpringFactoriesLoaderRuntimeHintsRegistrar implements RuntimeHintsRegistra
private static final Consumer<TypeHint.Builder> HINT = builder ->
builder.withMembers(MemberCategory.INVOKE_DECLARED_CONSTRUCTORS);
private static final Log logger = LogFactory.getLog(SpringFactoriesLoaderRuntimeHintsRegistrar.class);
private static final Log logger = LogFactory.getLog(SpringFactoriesLoaderRuntimeHints.class);
@Override

View File

@@ -1,3 +1,3 @@
org.springframework.aot.hint.RuntimeHintsRegistrar=\
org.springframework.aot.hint.support.CoreAnnotationsRuntimeHintsRegistrar,\
org.springframework.aot.hint.support.SpringFactoriesLoaderRuntimeHintsRegistrar
org.springframework.aot.hint.support.CoreAnnotationsRuntimeHints,\
org.springframework.aot.hint.support.SpringFactoriesLoaderRuntimeHints

View File

@@ -31,13 +31,13 @@ import org.springframework.util.ClassUtils;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link CoreAnnotationsRuntimeHintsRegistrar}.
* Tests for {@link CoreAnnotationsRuntimeHints}.
*
* @author Phillip Webb
*/
class CoreAnnotationsRuntimeHintsRegistrarTests {
class CoreAnnotationsRuntimeHintsTests {
private RuntimeHints hints = new RuntimeHints();
private final RuntimeHints hints = new RuntimeHints();
@BeforeEach
void setup() {

View File

@@ -31,11 +31,11 @@ import org.springframework.util.ClassUtils;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for {@link SpringFactoriesLoaderRuntimeHintsRegistrar}.
* Tests for {@link SpringFactoriesLoaderRuntimeHints}.
*
* @author Phillip Webb
*/
class SpringFactoriesLoaderRuntimeHintsRegistrarTests {
class SpringFactoriesLoaderRuntimeHintsTests {
private RuntimeHints hints;