Top Description Methods
org.springframework.aot.hint

public Interface ConditionalHint

Known Direct Implementers
org.springframework.aot.hint.JavaSerializationHint, org.springframework.aot.hint.JdkProxyHint, org.springframework.aot.hint.ResourceBundleHint, org.springframework.aot.hint.ResourcePatternHint, org.springframework.aot.hint.TypeHint
Imports
org.springframework.lang.Nullable, org.springframework.util.ClassUtils

Contract for runtime hints that only apply if the described condition is met.
Author
Brian Clozel
Since
6.0

Method Summary

Modifier and TypeMethod and Description
public default boolean

Returns:

whether the condition is met and the hint applies
conditionMatches
(ClassLoader
the current classloader
classLoader
)

Whether the condition described for this hint is met.

public TypeReference

Returns:

the reachable type, if any
getReachableType
()

Return the type that should be reachable for this hint to apply, or null if this hint should always been applied.

Method Detail

conditionMatchesback to summary
public default boolean conditionMatches(ClassLoader classLoader)

Whether the condition described for this hint is met. If it is not, the hint does not apply.

Instead of checking for actual reachability of a type in the application, the classpath is checked for the presence of this type as a simple heuristic.

Parameters
classLoader:ClassLoader

the current classloader

Returns:boolean

whether the condition is met and the hint applies

getReachableTypeback to summary
public TypeReference getReachableType()

Return the type that should be reachable for this hint to apply, or null if this hint should always been applied.

Returns:TypeReference

the reachable type, if any

Annotations
@Nullable