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. |
static interface |
DataTypeBuilder.DataTypeFunctionTypeBuilder
Provides methods to set data associated to the resources of an
ExpressionFunction. |
static interface |
DataTypeBuilder.DataTypeMapTypeBuilder
|
| 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 Iterables. |
DataTypeBuilder.DataTypeFunctionTypeBuilder |
asFunctionTypeBuilder()
Down-casts the builder to
DataTypeBuilder.DataTypeFunctionTypeBuilder, allowing the builder to be used in a fluent way
without having to cast it when dealing with ExpressionFunctions. |
DataTypeBuilder.DataTypeMapTypeBuilder |
asMapTypeBuilder()
Down-casts the builder to
DataTypeBuilder.DataTypeMapTypeBuilder, allowing the builder to be used in a fluent way
without having to cast it when dealing with Maps. |
DataTypeBuilder.DataTypeCollectionTypeBuilder |
collectionType(Class<? extends Collection> collectionType)
Sets the given type for the
CollectionDataType to be built. |
DataTypeBuilder.DataTypeFunctionTypeBuilder |
fromFunction(ExpressionFunction function)
Populates the builder from the given
ExpressionFunction. |
DataTypeParamsBuilder |
fromObject(Object value)
Populates the builder from the given
value. |
DataTypeBuilder.DataTypeFunctionTypeBuilder |
functionType(Class<? extends ExpressionFunction> functionType)
Sets the given type for the
FunctionDataType to be built. |
DataTypeBuilder.DataTypeMapTypeBuilder |
mapType(Class<? extends Map> mapType)
Sets the given type for the
MapDataType to be built. |
DataTypeBuilder.DataTypeCollectionTypeBuilder |
streamType(Class<? extends Iterator> iteratorType)
Sets the given type for the
CollectionDataType to be built. |
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 streamType(Class<? extends Iterator> iteratorType)
CollectionDataType to be built. See
DataType.getType().iteratorType - the java collection type to set.IllegalArgumentException - if the given collectionType is not a descendant of
Iterator.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 Iterables.DataTypeBuilder.DataTypeFunctionTypeBuilder functionType(Class<? extends ExpressionFunction> functionType)
FunctionDataType to be built.functionType - the java ExpressionFunction type to setDataTypeBuilder.DataTypeFunctionTypeBuilder asFunctionTypeBuilder()
DataTypeBuilder.DataTypeFunctionTypeBuilder, allowing the builder to be used in a fluent way
without having to cast it when dealing with ExpressionFunctions.DataTypeBuilder.DataTypeMapTypeBuilder mapType(Class<? extends Map> mapType)
MapDataType to be built.mapType - the java map type to setDataTypeBuilder.DataTypeMapTypeBuilder asMapTypeBuilder()
DataTypeBuilder.DataTypeMapTypeBuilder, allowing the builder to be used in a fluent way
without having to cast it when dealing with Maps.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.DataTypeBuilder.DataTypeFunctionTypeBuilder fromFunction(ExpressionFunction function)
ExpressionFunction.function - the ExpressionFunction to useCopyright © 2017 MuleSoft, Inc.. All rights reserved.