public interface DataMapperLibrary
A DataMapperLibrary is an independently loadable library of data mapping functions.
| Modifier and Type | Method and Description |
|---|---|
boolean |
canParseSpec(String spec)
DataMapper Libraries are required to test specifier strings in order to determine
whether or not the library could possibly find matching functions.
|
default <T> Optional<DataMapper<T>> |
getDataMapper(String spec)
Find the implementation for and construct an instance of a data mapper function, as described.
|
default <T> DataMapper<T> |
getDataMapper(String spec,
Class<? extends T> clazz) |
List<String> |
getDataMapperNames()
Get the list of known data mapping function names.
|
default Optional<DataMapper<Double>> |
getDoubleDataMapper(String spec) |
default Optional<DataMapper<Integer>> |
getIntegerDataMapper(String spec) |
String |
getLibraryName()
Return the name for this data mapper implementation, as it can be used in spec strings, etc.
|
default Optional<DataMapper<Long>> |
getLongDataMapper(String spec) |
default <T> Optional<DataMapper<T>> |
getOptionalDataMapper(String spec,
Class<? extends T> clazz) |
default Optional<DataMapper<String>> |
getStringDataMapper(String spec) |
Optional<ResolvedFunction> |
resolveFunction(String spec) |
List<ResolvedFunction> |
resolveFunctions(String specifier) |
String getLibraryName()
Return the name for this data mapper implementation, as it can be used in spec strings, etc.
default <T> Optional<DataMapper<T>> getDataMapper(String spec)
Find the implementation for and construct an instance of a data mapper function, as described.
T - The result type produced by the data mapping function.spec - A specifier that describes the type and or parameterization of a data mapping function instance.default <T> Optional<DataMapper<T>> getOptionalDataMapper(String spec, Class<? extends T> clazz)
default <T> DataMapper<T> getDataMapper(String spec, Class<? extends T> clazz)
boolean canParseSpec(String spec)
spec - a data mapping function specOptional<ResolvedFunction> resolveFunction(String spec)
List<ResolvedFunction> resolveFunctions(String specifier)
specifier - A specifier that describes the type and parameterization of a data mapping function instance.
The type of specifier will be specific to your library implementation. You can use SpecData by default.List<String> getDataMapperNames()
Get the list of known data mapping function names.
default Optional<DataMapper<Long>> getLongDataMapper(String spec)
default Optional<DataMapper<Double>> getDoubleDataMapper(String spec)
default Optional<DataMapper<Integer>> getIntegerDataMapper(String spec)
default Optional<DataMapper<String>> getStringDataMapper(String spec)
Copyright © 2018. All rights reserved.