public class ResolverSet extends Object implements ValueResolver<ResolverSetResult>
ValueResolver which is based on associating a set of
Parameters -> ValueResolver pairs. The result
of evaluating this resolver is a ResolverSetResult.
The general purpose of this class is to repeatedly evaluate a set of ValueResolvers
which results are to be used in the construction of an object, so that the structure
of such can be described only once (by the set of Parameters and ValueResolvers
but evaluated many times. With this goal in mind is that the return value of this resolver
will always be a ResolverSetResult which then can be used by a ObjectBuilder
to generate an actual object.
Instances of this class are to be considered thread safe and reusable| Constructor and Description |
|---|
ResolverSet() |
| Modifier and Type | Method and Description |
|---|---|
ResolverSet |
add(org.mule.extension.introspection.Parameter parameter,
ValueResolver resolver)
Links the given
ValueResolver to the given Parameter. |
Map<org.mule.extension.introspection.Parameter,ValueResolver> |
getResolvers() |
boolean |
isDynamic()
Whether at least one of the given
ValueResolver are dynamic |
ResolverSetResult |
resolve(MuleEvent event)
Evaluates all the added
ValueResolvers and returns the results into
a ResolverSetResult |
public ResolverSet add(org.mule.extension.introspection.Parameter parameter, ValueResolver resolver)
ValueResolver to the given Parameter.
If such parameter was already added, then the associated resolver
is replaced.parameter - a not null Parameterresolver - a not null ValueResolverIllegalArgumentException - is either parameter or resolver are nullpublic boolean isDynamic()
ValueResolver are dynamicisDynamic in interface ValueResolver<ResolverSetResult>true if at least one resolver is dynamic. false otherwisepublic ResolverSetResult resolve(MuleEvent event) throws MuleException
ValueResolvers and returns the results into
a ResolverSetResultresolve in interface ValueResolver<ResolverSetResult>event - a not null MuleEventResolverSetResultExceptionMuleException - if the resolution of the value failspublic Map<org.mule.extension.introspection.Parameter,ValueResolver> getResolvers()
Copyright © 2003–2023 MuleSoft, Inc.. All rights reserved.