@Test public void should_transform_optional_generic_string() { Type optionalStringType = new TypeReference<Optional<String>>() {}.getType(); assertThat(objectMapper.transform("abc", optionalStringType), is(equalTo(Optional.<String>of("abc")))); assertThat(objectMapper.transform("", optionalStringType), is(equalTo(Optional.<String>of("")))); assertThat(objectMapper.transform(null, optionalStringType), is(equalTo(Optional.<String>empty()))); }
@Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } BuiltInParameterTransformer(Locale locale); }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } BuiltInParameterTransformer(Locale locale); @Override Object transform(String fromValue, Type toValueType); }
BuiltInParameterTransformer implements ParameterByTypeTransformer { @Override public Object transform(String fromValue, Type toValueType) { return doTransform(fromValue, toValueType, toValueType); } BuiltInParameterTransformer(Locale locale); @Override Object transform(String fromValue, Type toValueType);  }