本文整理了Java中org.eclipse.jetty.util.ajax.JSON.getConvertor()
方法的一些代码示例,展示了JSON.getConvertor()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。JSON.getConvertor()
方法的具体详情如下:
包路径:org.eclipse.jetty.util.ajax.JSON
类名称:JSON
方法名:getConvertor
[英]Lookup a convertor for a class.
If no match is found for the class, then the interfaces for the class are tried. If still no match is found, then the super class and it's interfaces are tried recursively.
[中]查找类的转换器。
如果找不到该类的匹配项,则尝试该类的接口。如果仍然没有找到匹配项,则递归地尝试超类及其接口。
代码示例来源:origin: org.eclipse.jetty/jetty-util-ajax
Convertor convertor = _convertors.get(cls.getName());
if (convertor == null && this != DEFAULT)
convertor = DEFAULT.getConvertor(cls);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
Convertor convertor = _convertors.get(cls.getName());
if (convertor == null && this != DEFAULT)
convertor = DEFAULT.getConvertor(cls);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
Convertor convertor = _convertors.get(cls.getName());
if (convertor == null && this != DEFAULT)
convertor = DEFAULT.getConvertor(cls);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
Convertor convertor = _convertors.get(cls.getName());
if (convertor == null && this != DEFAULT)
convertor = DEFAULT.getConvertor(cls);
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
Convertor convertor = _convertors.get(cls.getName());
if (convertor == null && this != DEFAULT)
convertor = DEFAULT.getConvertor(cls);
代码示例来源:origin: org.eclipse.jetty/jetty-util-ajax
protected Object convertTo(Class type, Map map)
{
if (type != null && Convertible.class.isAssignableFrom(type))
{
try
{
Convertible conv = (Convertible)type.getDeclaredConstructor().newInstance();
conv.fromJSON(map);
return conv;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
Convertor convertor = getConvertor(type);
if (convertor != null)
{
return convertor.fromJSON(map);
}
return map;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
protected Object convertTo(Class type, Map map)
{
if (type != null && Convertible.class.isAssignableFrom(type))
{
try
{
Convertible conv = (Convertible)type.newInstance();
conv.fromJSON(map);
return conv;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
Convertor convertor = getConvertor(type);
if (convertor != null)
{
return convertor.fromJSON(map);
}
return map;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
protected Object convertTo(Class type, Map map)
{
if (type != null && Convertible.class.isAssignableFrom(type))
{
try
{
Convertible conv = (Convertible)type.newInstance();
conv.fromJSON(map);
return conv;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
Convertor convertor = getConvertor(type);
if (convertor != null)
{
return convertor.fromJSON(map);
}
return map;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
protected Object convertTo(Class type, Map map)
{
if (type != null && Convertible.class.isAssignableFrom(type))
{
try
{
Convertible conv = (Convertible)type.newInstance();
conv.fromJSON(map);
return conv;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
Convertor convertor = getConvertor(type);
if (convertor != null)
{
return convertor.fromJSON(map);
}
return map;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
protected Object convertTo(Class type, Map map)
{
if (type != null && Convertible.class.isAssignableFrom(type))
{
try
{
Convertible conv = (Convertible)type.newInstance();
conv.fromJSON(map);
return conv;
}
catch (Exception e)
{
throw new RuntimeException(e);
}
}
Convertor convertor = getConvertor(type);
if (convertor != null)
{
return convertor.fromJSON(map);
}
return map;
}
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-webapp
Convertor convertor = getConvertor(object.getClass());
if (convertor != null)
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-plus
Convertor convertor = getConvertor(object.getClass());
if (convertor != null)
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-all-server
Convertor convertor = getConvertor(object.getClass());
if (convertor != null)
代码示例来源:origin: org.eclipse.jetty/jetty-util-ajax
Convertor convertor = getConvertor(object.getClass());
if (convertor != null)
代码示例来源:origin: org.eclipse.jetty.aggregate/jetty-server
Convertor convertor = getConvertor(object.getClass());
if (convertor != null)
内容来源于网络,如有侵权,请联系作者删除!