public final class ConfigurationObjectBuilder extends Object
ObjectBuilder to create instances that
implement a given Configuration.
The object instances are created through the Configuration#getInstantiator()#instantiateObject()
method. A ResolverSet is also used to automatically set this builders
properties. The name of the properties in the ResolverSet must match the
name of an actual property in the prototype class| Constructor and Description |
|---|
ConfigurationObjectBuilder(String name,
org.mule.extension.introspection.Extension extension,
org.mule.extension.introspection.Configuration configuration,
ResolverSet resolverSet,
org.mule.extension.runtime.ConfigurationInstanceRegistrationCallback registrationCallback) |
| 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 |
Object |
build(MuleEvent event)
Returns a new instance of the specified class.
|
Object |
build(ResolverSetResult result) |
protected Object |
instantiateObject()
Creates a new instance by calling
Configuration#getInstantiator()#instantiateObject()
Returns the instance to be returned before the properties have
been applied to it |
boolean |
isDynamic()
Whether any of the registered
ValueResolvers are dynamic |
public ConfigurationObjectBuilder(String name, org.mule.extension.introspection.Extension extension, org.mule.extension.introspection.Configuration configuration, ResolverSet resolverSet, org.mule.extension.runtime.ConfigurationInstanceRegistrationCallback registrationCallback)
public Object build(MuleEvent event) throws MuleException
MuleEvent will be used to obtain a
value from each registered ValueResolverbuild in interface ObjectBuilder<Object>event - a MuleEventMuleExceptionpublic Object build(ResolverSetResult result) throws MuleException
MuleExceptionprotected Object instantiateObject()
Configuration#getInstantiator()#instantiateObject()
Returns the instance to be returned before the properties have
been applied to itpublic ObjectBuilder<T> addPropertyResolver(Field field, ValueResolver<? extends Object> resolver)
ValueResolveraddPropertyResolver in interface ObjectBuilder<T>field - the Field in which the value is to be assignedresolver - a ValueResolver used to provide the actual valuepublic boolean isDynamic()
ValueResolvers are dynamicisDynamic in interface ObjectBuilder<T>true if at least one resolver is dynamic. false otherwiseCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.