/** * Use the data mapping library and the specifier to create instances of data mapping functions. * If you need thread-aware mapping, be sure to call this in the proper thread. Each time this method * is called, it creates a new instance. * @return A set of bindings that can be used to yield mapped data values later. */ public Bindings resolveBindings() { List<DataMapper<?>> dataMappers = new ArrayList<>(); for (String specifier : specifiers) { Optional<DataMapper<Object>> optionalDataMapper = VirtData.getOptionalMapper(specifier); if (optionalDataMapper.isPresent()) { dataMappers.add(optionalDataMapper.get()); } else { logAvailableDataMappers(); throw new RuntimeException( "data mapper binding was unsuccessful for " + ", spec:" + specifier + ", see log for known data mapper names."); } } return new Bindings(this, dataMappers); }