public final class ExclusiveParameterGroupObjectBuilder<T> extends DefaultObjectBuilder<T>
DefaultObjectBuilder extension that validates that the built object complies with
the rules specified in ExclusiveOptionalsprototypeClass, reflectionCache, resolverByFieldName, resolvers| Constructor and Description |
|---|
ExclusiveParameterGroupObjectBuilder(Class<T> prototypeClass,
org.mule.runtime.extension.api.declaration.type.annotation.ExclusiveOptionalsTypeAnnotation exclusiveOptionalsTypeAnnotation,
boolean lazyInitEnabled,
ReflectionCache reflectionCache)
Creates a new instance that will build instances of
prototypeClass. |
| 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 |
ObjectBuilder<T> |
addPropertyResolver(String propertyName,
ValueResolver<? extends Object> resolver)
Adds a property which value is to be obtained from a
ValueResolver |
T |
build(ValueResolvingContext context)
Returns a new instance of the specified class.
|
getParameterValue, initialise, isDynamic, setEncoding, setNamepublic ExclusiveParameterGroupObjectBuilder(Class<T> prototypeClass, org.mule.runtime.extension.api.declaration.type.annotation.ExclusiveOptionalsTypeAnnotation exclusiveOptionalsTypeAnnotation, boolean lazyInitEnabled, ReflectionCache reflectionCache)
prototypeClass.prototypeClass - a Class which needs to have a public defualt constructorpublic ObjectBuilder<T> addPropertyResolver(String propertyName, ValueResolver<? extends Object> resolver)
DefaultObjectBuilderValueResolveraddPropertyResolver in class DefaultObjectBuilder<T>propertyName - the name of the property in which the value is to be assignedresolver - a ValueResolver used to provide the actual valuepublic ObjectBuilder<T> addPropertyResolver(Field field, ValueResolver<? extends Object> resolver)
DefaultObjectBuilderValueResolveraddPropertyResolver in class DefaultObjectBuilder<T>field - the property in which the value is to be assignedresolver - a ValueResolver used to provide the actual valuepublic T build(ValueResolvingContext context) throws org.mule.runtime.api.exception.MuleException
ObjectBuilderValueResolvingContext will be used to obtain a value
from each registered ValueResolverbuild in interface ObjectBuilder<T>build in class DefaultObjectBuilder<T>context - a ValueResolvingContextorg.mule.runtime.api.exception.MuleExceptionCopyright © 2003–2024 MuleSoft, Inc.. All rights reserved.