本文整理了Java中org.geotools.util.Converters.factories()
方法的一些代码示例,展示了Converters.factories()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Converters.factories()
方法的具体详情如下:
包路径:org.geotools.util.Converters
类名称:Converters
方法名:factories
[英]Cached list of converter factories
[中]转换器工厂的缓存列表
代码示例来源:origin: geotools/geotools
/**
* Returns a set of all available {@link ConverterFactory}'s which can handle convert from the
* source to destination class.
*
* <p>This method essentially returns all factories in which the following returns non null.
*
* <pre>
* factory.createConverter( source, target );
* </pre>
*
* @since 2.5
*/
public static Set<ConverterFactory> getConverterFactories(Class<?> source, Class<?> target) {
HashSet<ConverterFactory> factories = new HashSet<ConverterFactory>();
for (ConverterFactory factory : factories()) {
if (factory.createConverter(source, target, null) != null) {
factories.add(factory);
}
}
return factories;
}
代码示例来源:origin: geotools/geotools
for (ConverterFactory factory : factories()) {
Converter converter = factory.createConverter(sourceClass, target, hints);
if (converter != null) {
代码示例来源:origin: org.geotools/gt2-main
for ( Iterator i = factories().iterator(); i.hasNext(); ) {
ConverterFactory factory = (ConverterFactory) i.next();
Converter converter = factory.createConverter( source.getClass(), target, hints );
内容来源于网络,如有侵权,请联系作者删除!