Interface ParameterizedExpression
- All Known Subinterfaces:
ElementExpression
@OpenApiAll
public interface ParameterizedExpression
Expression calculates the value according given parameter values (arguments).
Actual implementation must declare the public method
E.g.
Actual implementation must declare the public method
getValue
with custom number of parameters,
plus additional last parameter of ValueContext
type.
E.g.
public class ParameterizedExpressionImpl implements ParameterizedExpression { /** * Value calculation method. * * @param parameter1 parameter of String type. * @param parameter2 parameter of boolean type. * @param valueContext context mandatory parameter. * @return calculated value. */ public Object getValue(String parameter1, boolean parameter2, ValueContext valueContext) { // value context is ignored in this implementation // construct string using passed arguments return "String: " + parameter1 + " boolean: " + parameter2; } }
-
Method Summary
-
Method Details
-
getResultType
Returns type of the result. Null means that result type is unknown. If the expression returns a collection of objects then the implementation should return a class of single object.- Returns:
- result type.
-