Class RuntimeHintsPredicates
java.lang.Object
org.springframework.aot.hint.predicate.RuntimeHintsPredicates
Static generator of predicates that test whether the given
RuntimeHints
instance matches the expected behavior for reflection, resource, serialization,
or proxy generation.
This utility class can be used by 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:
Predicate<RuntimeHints> predicate = RuntimeHintsPredicates.reflection().onMethod(MyClass.class, "someMethod").invoke(); assertThat(predicate).accepts(runtimeHints);
- Since:
- 6.0
- Author:
- Brian Clozel, Stephane Nicoll
-
Method Summary
Modifier and TypeMethodDescriptionstatic ProxyHintsPredicates
proxies()
Return a predicate generator forproxy hints
.static ReflectionHintsPredicates
Return a predicate generator forreflection hints
.static ResourceHintsPredicates
resource()
Return a predicate generator forresource hints
.static SerializationHintsPredicates
Return a predicate generator forserialization hints
.
-
Method Details
-
reflection
Return a predicate generator forreflection hints
.- Returns:
- the predicate generator
-
resource
Return a predicate generator forresource hints
.- Returns:
- the predicate generator
-
serialization
Return a predicate generator forserialization hints
.- Returns:
- the predicate generator
-
proxies
Return a predicate generator forproxy hints
.- Returns:
- the predicate generator
-