public interface ObjectBuilder<T>
Class, populating its attributes
based on a list of ValueResolvers.
The built object's class must comply with the following
requirements:
build(MuleEvent) method can be invoked
several times on the same instance. Each time build(MuleEvent)
is invoked, the resolvers will be re evaluated with the given event.| Modifier and Type | Method and Description |
|---|---|
ObjectBuilder<T> |
addPropertyResolver(Field field,
ValueResolver<? extends Object> resolver)
Adds a property which value is to be obtained from
a
ValueResolver |
T |
build(MuleEvent event)
Returns a new instance of the specified class.
|
boolean |
isDynamic()
Whether any of the registered
ValueResolvers are dynamic |
ObjectBuilder<T> addPropertyResolver(Field field, ValueResolver<? extends Object> resolver)
ValueResolverfield - the Field in which the value is to be assignedresolver - a ValueResolver used to provide the actual value{@link - java.lang.IllegalArgumentException} if method or resolver are nullboolean isDynamic()
ValueResolvers are dynamictrue if at least one resolver is dynamic. false otherwiseT build(MuleEvent event) throws MuleException
MuleEvent will be used to obtain a
value from each registered ValueResolverevent - a MuleEvent{@link - MuleException}MuleExceptionCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.