本文整理汇总了Java中org.osgi.service.blueprint.container.Converter类的典型用法代码示例。如果您正苦于以下问题:Java Converter类的具体用法?Java Converter怎么用?Java Converter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Converter类属于org.osgi.service.blueprint.container包,在下文中一共展示了Converter类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: doConvert
import org.osgi.service.blueprint.container.Converter; //导入依赖的package包/类
private Object doConvert(Object source, ReifiedType type) {
synchronized (converters) {
for (Converter converter : converters) {
try {
if (converter.canConvert(source, type)) {
return converter.convert(source, type);
}
} catch (Exception ex) {
throw new BlueprintConverterException("Conversion between source " + source + " and reified type "
+ type + " failed", ex);
}
}
}
return null;
}
示例2: BlueprintConverterConfigurer
import org.osgi.service.blueprint.container.Converter; //导入依赖的package包/类
public BlueprintConverterConfigurer(List<Converter> converters) {
this.converters = converters;
}
示例3: add
import org.osgi.service.blueprint.container.Converter; //导入依赖的package包/类
public void add(Converter blueprintConverter) {
synchronized (converters) {
converters.add(blueprintConverter);
}
}