Interface ValueSource
-
- All Known Subinterfaces:
FeedbackEnabledValueSource
,QueryEnabledValueSource
- All Known Implementing Classes:
AbstractDelegatingValueSource
,AbstractFunctionValueSourceWrapper
,AbstractValueSource
,EnvarBasedValueSource
,FeedbackingValueSource
,FixedInterpolatorValueSource
,MapBasedValueSource
,ObjectBasedValueSource
,PrefixedObjectValueSource
,PrefixedPropertiesValueSource
,PrefixedValueSourceWrapper
,PropertiesBasedValueSource
,SingleResponseValueSource
public interface ValueSource
Supplies one strategy for resolving a value for an interpolation expression. ValueSources may be stacked.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description void
clearFeedback()
Clear the feedback accumulated by a prior interpolation run.java.util.List
getFeedback()
Return the feedback about resolution failures for a particular expression.java.lang.Object
getValue(java.lang.String expression)
default java.lang.Object
getValue(java.lang.String expression, java.lang.String expressionStartDelimiter, java.lang.String expressionEndDelimiter)
Returns a value resolved from an expression.
-
-
-
Method Detail
-
getValue
default java.lang.Object getValue(java.lang.String expression, java.lang.String expressionStartDelimiter, java.lang.String expressionEndDelimiter)
Returns a value resolved from an expression. The return value is recursively resolved viaBasicInterpolator.interpolate(String)
, i.e. might contain expressions as well.- Parameters:
expression
- The string expression.expressionStartDelimiter
- A valid start delimiter of the expression to be used with the callingInterpolator
(by default${
).expressionEndDelimiter
- A valid end delimiter of the expression to be used with the callingInterpolator
(by default}
).- Returns:
- the value related to the expression, or
null
if not found. This value might contain other expressions separated byexpressionStartDelimiter
andexpressionEndDelimiter
- Since:
- 1.28
-
getValue
java.lang.Object getValue(java.lang.String expression)
- Parameters:
expression
- The string expression.- Returns:
- the value related to the expression, or
null
if not found. - See Also:
getValue(String, String, String)
-
getFeedback
java.util.List getFeedback()
Return the feedback about resolution failures for a particular expression.- Returns:
- a combination of String and Throwable instances, where strings related to throwables are listed first.
-
clearFeedback
void clearFeedback()
Clear the feedback accumulated by a prior interpolation run.
-
-