T - public class ExpressionValueResolver<T> extends Object implements ExpressionBasedValueResolver<T>, org.mule.runtime.api.lifecycle.Initialisable
ValueResolver which evaluates a MEL expressions
It resolves the expressions by making use of the AttributeEvaluator so that it's compatible with simple expressions and
templates alike
| Constructor and Description |
|---|
ExpressionValueResolver(String expression) |
ExpressionValueResolver(String expression,
org.mule.runtime.api.metadata.DataType expectedDataType,
Boolean melDefault,
Boolean melAvailable) |
| Modifier and Type | Method and Description |
|---|---|
String |
getExpression() |
void |
initialise() |
boolean |
isDynamic()
Returns
false if subsequent invocations to ValueResolver.resolve(ValueResolvingContext) will return the same value. |
boolean |
isMelAvailable() |
T |
resolve(ValueResolvingContext context)
Resolves a value from the given
event |
protected <V> org.mule.runtime.api.metadata.TypedValue<V> |
resolveTypedValue(ValueResolvingContext context) |
void |
setRegistry(org.mule.runtime.api.artifact.Registry registry) |
public ExpressionValueResolver(String expression, org.mule.runtime.api.metadata.DataType expectedDataType, Boolean melDefault, Boolean melAvailable)
public ExpressionValueResolver(String expression)
public void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableorg.mule.runtime.api.lifecycle.InitialisationExceptionpublic T resolve(ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
ValueResolvereventresolve in interface ValueResolver<T>context - the context for the current resolution attemptorg.mule.runtime.api.exception.MuleException - if the resolution of the value failsprotected <V> org.mule.runtime.api.metadata.TypedValue<V> resolveTypedValue(ValueResolvingContext context)
public boolean isDynamic()
ValueResolverfalse if subsequent invocations to ValueResolver.resolve(ValueResolvingContext) will return the same value. Notice
that if it returns true, then it might return different values per invocation but that's not guaranteed.isDynamic in interface ValueResolver<T>truepublic String getExpression()
getExpression in interface ExpressionBasedValueResolver<T>ValueResolverpublic boolean isMelAvailable()
public void setRegistry(org.mule.runtime.api.artifact.Registry registry)
Copyright © 2003–2022 MuleSoft, Inc.. All rights reserved.