public class VirtData extends Object
| Constructor and Description |
|---|
VirtData() |
| Modifier and Type | Method and Description |
|---|---|
static <T> DataMapper<T> |
getMapper(String flowSpec)
Instantiate a data mapping function, or throw an exception.
|
static <T> DataMapper<T> |
getMapper(String flowSpec,
Class<? extends T> clazz)
Instantiate a data mapping function of the specified type, or throw an error.
|
static <T> Optional<DataMapper<T>> |
getOptionalMapper(String flowSpec)
Instantiate an optional data mapping function if possible.
|
static <T> Optional<DataMapper<T>> |
getOptionalMapper(String flowSpec,
Class<? extends T> clazz) |
static BindingsTemplate |
getTemplate(Map<String,String> namedBindings)
Create a bindings template from the provided map, ensuring that
the syntax of the bindings specs is parsable first.
|
static BindingsTemplate |
getTemplate(String... namesAndSpecs)
Create a bindings template from the pair-wise names and specifiers.
|
public static BindingsTemplate getTemplate(String... namesAndSpecs)
namesAndSpecs - names and specs in "name", "spec", ... formpublic static BindingsTemplate getTemplate(Map<String,String> namedBindings)
namedBindings - The named bindings mappublic static <T> Optional<DataMapper<T>> getOptionalMapper(String flowSpec)
T - The parameterized return type of the functionflowSpec - The VirtData specifier for the mapping functionpublic static <T> DataMapper<T> getMapper(String flowSpec)
T - The parameterized return type of the functionflowSpec - The VirtData specifier for the mapping functionRuntimeException - if the function could not be resolvedpublic static <T> DataMapper<T> getMapper(String flowSpec, Class<? extends T> clazz)
T - The parameterized class of the data mapping return typeflowSpec - The VirtData flow specifier for the function to be returnedclazz - The class of the data mapping function return typeRuntimeException - if the function could not be resolvedpublic static <T> Optional<DataMapper<T>> getOptionalMapper(String flowSpec, Class<? extends T> clazz)
Copyright © 2018. All rights reserved.