private static Object convert(TypeConverter typeConverter, Class<?> type, Object value)
throws URISyntaxException, NoTypeConversionAvailableException {
if (typeConverter != null) {
return typeConverter.mandatoryConvertTo(type, value);
}
if (type == URI.class) {
return new URI(value.toString());
}
PropertyEditor editor = PropertyEditorManager.findEditor(type);
if (editor != null) {
// property editor is not thread safe, so we need to lock
Object answer;
synchronized (LOCK) {
editor.setAsText(value.toString());
answer = editor.getValue();
}
return answer;
}
return null;
}
IntrospectionSupport.java 文件源码
java
阅读 19
收藏 0
点赞 0
评论 0
项目:Camel
作者:
评论列表
文章目录