public interface DataTypeBuilder extends DataTypeParamsBuilder
DataType objects.
Implementations need not be thread safe.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
DataTypeBuilder.DataTypeCollectionTypeBuilder
Provides methods to set data associated to the items of a
Collection, when the type
is a Collection. |
| Modifier and Type | Method and Description |
|---|---|
DataTypeBuilder.DataTypeCollectionTypeBuilder |
asCollectionTypeBuilder()
Down-casts the builder to
DataTypeBuilder.DataTypeCollectionTypeBuilder, allowing the builder to be used in a fluent way
without having to cast it when dealing with Collections. |
DataTypeBuilder.DataTypeCollectionTypeBuilder |
collectionType(Class<? extends Collection> collectionType)
Sets the given type for the
CollectionDataType to be built. |
DataTypeParamsBuilder |
fromObject(Object value)
Populates the builder from the given
value. |
DataTypeParamsBuilder |
type(Class<?> type)
Sets the given type for the
DataType to be built. |
DataTypeParamsBuilder type(Class<?> type)
DataType to be built. See DataType.getType().type - the java type to set.DataTypeBuilder.DataTypeCollectionTypeBuilder collectionType(Class<? extends Collection> collectionType)
CollectionDataType to be built. See
DataType.getType().collectionType - the java collection type to set.IllegalArgumentException - if the given collectionType is not a descendant of
Collection.DataTypeBuilder.DataTypeCollectionTypeBuilder asCollectionTypeBuilder()
DataTypeBuilder.DataTypeCollectionTypeBuilder, allowing the builder to be used in a fluent way
without having to cast it when dealing with Collections.DataTypeParamsBuilder fromObject(Object value)
value.
This method will get the type, mimeType and encoding from the given value
according to its concrete type.
value - an object instance.Copyright © 2016 MuleSoft, Inc.. All rights reserved.