Interface StaticExpression
- All Superinterfaces:
Expression
Marker for an
Expression whose value is a compile-time or configuration-time constant.
A static expression always evaluates to the same result regardless of the Exchange, so the framework can
optimize it: it is evaluated once, the result is cached, and no per-exchange evaluation overhead is incurred.
Implementations must expose the constant through getValue() and allow it to be overwritten via
setValue(Object) (for example, when a property placeholder is resolved at startup).- Since:
- 3.7
- See Also:
-
Method Summary
Methods inherited from interface Expression
evaluate, init
-
Method Details
-
getValue
@Nullable Object getValue()Gets the constant value -
setValue
Sets the constant value
-