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.
This ValueSetter knows how to map a ResolverSetResult to an object
which acts as a group. Because group nesting is allowed, this class is a composite
with a childSetters collection.| Constructor and Description |
|---|
GroupValueSetter(ParameterGroup group)
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.extension.introspection.Capable capable)
Returns a
List containing one ValueSetter instance per each
ParameterGroup defined in the ParameterGroupCapability extracted
from the given capable. |
public GroupValueSetter(ParameterGroup group)
groupgroup - a ParameterGrouppublic static List<ValueSetter> settersFor(org.mule.extension.introspection.Capable capable)
List containing one ValueSetter instance per each
ParameterGroup defined in the ParameterGroupCapability extracted
from the given capable. If capable does not contain such capability
then an empty List is returnedcapable - a Capable instance presumed to have the ParameterGroupCapabilityList with ValueSetter instances. May be empty but will never be nullpublic void set(Object target, ResolverSetResult result) throws 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 ResolverSetResultMuleExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.