public final class GroupValueSetter extends Object implements ValueSetter
ValueSetter for parameter groups. Parameter groups are a set of parameters defined inside a Pojo
in order to reference them as a group and avoid code repetition. The parameter groups are defined by applying the
ParameterGroup annotation to a field.| Constructor and Description |
|---|
GroupValueSetter(ParameterGroupDescriptor groupDescriptor,
Supplier<ReflectionCache> reflectionCache)
Creates a new instance that can set values defined in the given
group |
| Modifier and Type | Method and Description |
|---|---|
void |
set(Object target,
ResolverSetResult result)
Sets on
target values contained in result. |
static List<ValueSetter> |
settersFor(org.mule.runtime.api.meta.model.parameter.ParameterizedModel model,
Supplier<ReflectionCache> reflectionCache)
Returns a
List containing one ValueSetter instance per each ParameterGroupDescriptor defined in the
ParameterGroupModelProperty extracted from the given model. |
public GroupValueSetter(ParameterGroupDescriptor groupDescriptor, Supplier<ReflectionCache> reflectionCache)
groupgroupDescriptor - a ParameterGroupDescriptorreflectionCache - the cache for expensive reflection lookupspublic static List<ValueSetter> settersFor(org.mule.runtime.api.meta.model.parameter.ParameterizedModel model, Supplier<ReflectionCache> reflectionCache)
List containing one ValueSetter instance per each ParameterGroupDescriptor defined in the
ParameterGroupModelProperty extracted from the given model. If model does not contain such model
property then an empty List is returnedmodel - a EnrichableModel instance presumed to have the ParameterGroupModelPropertyreflectionCache - the cache for expensive reflection lookupsList with ValueSetter instances. May be empty but will never be nullpublic void set(Object target, ResolverSetResult result) throws org.mule.runtime.api.exception.MuleException
ValueSettertarget values contained in result. This method does not guarantee how many of the values contained in
result are actually assigned (if any). Implementations are free to decide using only a sub set of those values or
none at allset in interface ValueSettertarget - the object on which values are to be setresult - a ResolverSetResultorg.mule.runtime.api.exception.MuleExceptionCopyright © 2003–2024 MuleSoft, Inc.. All rights reserved.