List of usage examples for com.fasterxml.jackson.core.type TypeReference toString
public String toString()
From source file:org.fasterxml.jackson.tc.TreeTest.java
static <T extends Enum<T>, K> K transcodeFromMap(Map<T, Object> configuration, TypeReference<K> configurationType) { ObjectMapper mapper = TestEnumModule.setupObjectMapper(new ObjectMapper(new YAMLFactory())); JsonNode tree = mapper.valueToTree(configuration); try {//from w ww .j a v a 2 s . c o m return mapper.readerFor(configurationType).readValue(tree); } catch (IOException e) { throw new RuntimeException( "Failed to map configuration map to object of type " + configurationType.toString(), e); } }