T - the generic type of the produced values.public class NullSafeValueResolverWrapper<T> extends Object implements ValueResolver<T>
ValueResolver wrapper which generates and returns default instances
if the delegate returns null.
The values are generated according to the rules described in NullSafe.
Instances are to be obtained through the of(ValueResolver, MetadataType, MuleContext, ObjectTypeParametersResolver) )}
factory method
| Modifier and Type | Method and Description |
|---|---|
boolean |
isDynamic()
returns
false if subsequent invocations to ValueResolver.resolve(Event) will return the same value. |
static <T> ValueResolver<T> |
of(ValueResolver<T> delegate,
org.mule.metadata.api.model.MetadataType type,
MuleContext muleContext,
ObjectTypeParametersResolver parametersResolver)
Creates a new instance
|
T |
resolve(Event event)
Resolves a value from the given
event |
public static <T> ValueResolver<T> of(ValueResolver<T> delegate, org.mule.metadata.api.model.MetadataType type, MuleContext muleContext, ObjectTypeParametersResolver parametersResolver)
T - the generic type of the produced valuesdelegate - the ValueResolver to wraptype - the type of the value this resolver returnsmuleContext - the current MuleContextValueResolverorg.mule.runtime.extension.api.exception.IllegalParameterModelDefinitionException - if used on parameters of not supported typespublic T resolve(Event event) throws org.mule.runtime.api.exception.MuleException
ValueResolvereventresolve in interface ValueResolver<T>event - a Eventorg.mule.runtime.api.exception.MuleException - if the resolution of the value failspublic boolean isDynamic()
ValueResolverfalse if subsequent invocations to ValueResolver.resolve(Event) 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>Copyright © 2003–2017 MuleSoft, Inc.. All rights reserved.