Class DefaultPromptExecutionReplacerContextResolver
- java.lang.Object
-
- de.xima.fc.prompt.service.defaults.DefaultPromptExecutionReplacerContextResolver
-
public final class DefaultPromptExecutionReplacerContextResolver extends Object
Default implementations ofIPromptExecutionReplacerContextResolver.- Since:
- 8.5.0
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static IPromptExecutionReplacerContextResolverchained(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.static IPromptExecutionReplacerContextResolvernoOp()A no-op context resolver that does not resolve anything, always returning null.
-
-
-
Method Detail
-
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
public static IPromptExecutionReplacerContextResolver noOp()
A no-op context resolver that does not resolve anything, always returning null.- Returns:
- A no-op context resolver.
-
-