Class DefaultPromptExecutionReplacerContextResolver
java.lang.Object
de.xima.fc.prompt.service.defaults.DefaultPromptExecutionReplacerContextResolver
Default implementations of
IPromptExecutionReplacerContextResolver.- Since:
- 8.5.0
-
Method Summary
Modifier and TypeMethodDescriptionchained(IPromptExecutionReplacerContextResolver... contextResolvers) Creates a chained context resolver that tries each of the given context resolvers in order until one of them returns a non-null value.noOp()A no-op context resolver that does not resolve anything, always returning null.
-
Method Details
-
chained
public static IPromptExecutionReplacerContextResolver chained(IPromptExecutionReplacerContextResolver... contextResolvers) Creates a chained context resolver that tries each of the given context resolvers in order until one of them returns a non-null value. If all context resolvers return null, the chained resolver also returns null.- Parameters:
contextResolvers- The context resolvers to chain. If null or empty, a no-op resolver is returned. null values in the array are ignored.- Returns:
- A chained context resolver.
-
noOp
A no-op context resolver that does not resolve anything, always returning null.- Returns:
- A no-op context resolver.
-