Package org.springframework.aot.hint.predicate

# Class RuntimeHintsPredicates

java.lang.Object
org.springframework.aot.hint.predicate.RuntimeHintsPredicates

public abstract class RuntimeHintsPredicates extends Object
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 Type
Method
Description
`static ProxyHintsPredicates`
`proxies()`
Return a predicate generator for `proxy hints`.
`static ReflectionHintsPredicates`
`reflection()`
Return a predicate generator for `reflection hints`.
`static ResourceHintsPredicates`
`resource()`
Return a predicate generator for `resource hints`.
`static SerializationHintsPredicates`
`serialization()`
Return a predicate generator for `serialization hints`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### reflection

public static ReflectionHintsPredicates reflection()
Return a predicate generator for `reflection hints`.

Returns:
  the predicate generator

### resource

public static ResourceHintsPredicates resource()
Return a predicate generator for `resource hints`.

Returns:
  the predicate generator

### serialization

public static SerializationHintsPredicates serialization()
Return a predicate generator for `serialization hints`.

Returns:
  the predicate generator

### proxies

public static ProxyHintsPredicates proxies()
Return a predicate generator for `proxy hints`.

Returns:
  the predicate generator