diff --git a/spring-core/src/main/java/org/springframework/aot/hint/ProxyHintsPredicates.java b/spring-core/src/main/java/org/springframework/aot/hint/ProxyHintsPredicates.java index f4d83126c28..cc82d8ea5a2 100644 --- a/spring-core/src/main/java/org/springframework/aot/hint/ProxyHintsPredicates.java +++ b/spring-core/src/main/java/org/springframework/aot/hint/ProxyHintsPredicates.java @@ -24,6 +24,7 @@ import org.springframework.util.Assert; /** * Generator of {@link ProxyHints} predicates, testing whether the given hints * match the expected behavior for proxies. + * * @author Brian Clozel * @since 6.0 */ diff --git a/spring-core/src/main/java/org/springframework/aot/hint/ReflectionHintsPredicates.java b/spring-core/src/main/java/org/springframework/aot/hint/ReflectionHintsPredicates.java index 107d1900c31..db3c9a81505 100644 --- a/spring-core/src/main/java/org/springframework/aot/hint/ReflectionHintsPredicates.java +++ b/spring-core/src/main/java/org/springframework/aot/hint/ReflectionHintsPredicates.java @@ -34,6 +34,7 @@ import org.springframework.util.ReflectionUtils; /** * Generator of {@link ReflectionHints} predicates, testing whether the given hints * match the expected behavior for reflection. + * * @author Brian Clozel * @since 6.0 */ @@ -265,6 +266,7 @@ public class ReflectionHintsPredicates { super(constructor); } + @Override MemberCategory[] getPublicMemberCategories() { if (this.executableMode == ExecutableMode.INTROSPECT) { return new MemberCategory[] {MemberCategory.INTROSPECT_PUBLIC_CONSTRUCTORS, @@ -273,6 +275,7 @@ public class ReflectionHintsPredicates { return new MemberCategory[] {MemberCategory.INVOKE_PUBLIC_CONSTRUCTORS}; } + @Override MemberCategory[] getDeclaredMemberCategories() { if (this.executableMode == ExecutableMode.INTROSPECT) { return new MemberCategory[] {MemberCategory.INTROSPECT_DECLARED_CONSTRUCTORS, @@ -299,6 +302,7 @@ public class ReflectionHintsPredicates { super(method); } + @Override MemberCategory[] getPublicMemberCategories() { if (this.executableMode == ExecutableMode.INTROSPECT) { return new MemberCategory[] {MemberCategory.INTROSPECT_PUBLIC_METHODS, @@ -307,6 +311,7 @@ public class ReflectionHintsPredicates { return new MemberCategory[] {MemberCategory.INVOKE_PUBLIC_METHODS}; } + @Override MemberCategory[] getDeclaredMemberCategories() { if (this.executableMode == ExecutableMode.INTROSPECT) { diff --git a/spring-core/src/main/java/org/springframework/aot/hint/ReflectionTypeReference.java b/spring-core/src/main/java/org/springframework/aot/hint/ReflectionTypeReference.java index ddd84aa620f..2da3520648c 100644 --- a/spring-core/src/main/java/org/springframework/aot/hint/ReflectionTypeReference.java +++ b/spring-core/src/main/java/org/springframework/aot/hint/ReflectionTypeReference.java @@ -22,6 +22,7 @@ import org.springframework.lang.Nullable; * A {@link TypeReference} based on a {@link Class}. * * @author Stephane Nicoll + * @since 6.0 */ final class ReflectionTypeReference extends AbstractTypeReference { diff --git a/spring-core/src/main/java/org/springframework/aot/hint/ResourceHintsPredicates.java b/spring-core/src/main/java/org/springframework/aot/hint/ResourceHintsPredicates.java index b31da9ed089..09114250f20 100644 --- a/spring-core/src/main/java/org/springframework/aot/hint/ResourceHintsPredicates.java +++ b/spring-core/src/main/java/org/springframework/aot/hint/ResourceHintsPredicates.java @@ -25,6 +25,7 @@ import org.springframework.util.ConcurrentLruCache; /** * Generator of {@link ResourceHints} predicates, testing whether the given hints * match the expected behavior for resources. + * * @author Brian Clozel * @since 6.0 */ diff --git a/spring-core/src/main/java/org/springframework/aot/hint/RuntimeHintsPredicates.java b/spring-core/src/main/java/org/springframework/aot/hint/RuntimeHintsPredicates.java index 0c7635e823f..4c01a3a837d 100644 --- a/spring-core/src/main/java/org/springframework/aot/hint/RuntimeHintsPredicates.java +++ b/spring-core/src/main/java/org/springframework/aot/hint/RuntimeHintsPredicates.java @@ -18,7 +18,8 @@ package org.springframework.aot.hint; /** * Static generator of predicates that test whether the given {@link RuntimeHints} - * instance matches the expected behavior for reflection, resource or proxy generation. + * instance matches the expected behavior for reflection, resource, or proxy generation. + * *
This utility class can be used by {@link RuntimeHintsRegistrar} to conditionally
* register hints depending on what's present already. This can also be used as a
* testing utility for checking proper registration of hints:
@@ -26,6 +27,7 @@ package org.springframework.aot.hint;
* Predicate<RuntimeHints> predicate = RuntimeHintsPredicates.reflection().onMethod(MyClass.class, "someMethod").invoke();
* assertThat(predicate).accepts(runtimeHints);
*
+ *
* @author Brian Clozel
* @since 6.0
*/
@@ -39,7 +41,6 @@ public abstract class RuntimeHintsPredicates {
private RuntimeHintsPredicates() {
-
}
/**
diff --git a/spring-core/src/main/java/org/springframework/aot/hint/SimpleTypeReference.java b/spring-core/src/main/java/org/springframework/aot/hint/SimpleTypeReference.java
index 2e95d1627c9..e20aaff41ca 100644
--- a/spring-core/src/main/java/org/springframework/aot/hint/SimpleTypeReference.java
+++ b/spring-core/src/main/java/org/springframework/aot/hint/SimpleTypeReference.java
@@ -27,6 +27,7 @@ import org.springframework.util.Assert;
* A {@link TypeReference} based on fully qualified name.
*
* @author Stephane Nicoll
+ * @since 6.0
*/
final class SimpleTypeReference extends AbstractTypeReference {
diff --git a/spring-core/src/test/java/org/springframework/aot/hint/ReflectionTypeReferenceTests.java b/spring-core/src/test/java/org/springframework/aot/hint/ReflectionTypeReferenceTests.java
index e36883cea24..4e933074e68 100644
--- a/spring-core/src/test/java/org/springframework/aot/hint/ReflectionTypeReferenceTests.java
+++ b/spring-core/src/test/java/org/springframework/aot/hint/ReflectionTypeReferenceTests.java
@@ -23,6 +23,7 @@ import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.params.provider.Arguments.arguments;
/**
* Tests for {@link ReflectionTypeReference}.
@@ -34,28 +35,24 @@ class ReflectionTypeReferenceTests {
@ParameterizedTest
@MethodSource("reflectionTargetNames")
- void typeReferenceFromClasHasSuitableReflectionTargetName(TypeReference typeReference, String binaryName) {
- assertThat(typeReference.getName()).isEqualTo(binaryName);
+ void typeReferenceFromClassHasSuitableReflectionTargetName(Class> clazz, String binaryName) {
+ assertThat(ReflectionTypeReference.of(clazz).getName()).isEqualTo(binaryName);
}
static Stream