ConverterTracker.java 文件源码

java
阅读 24 收藏 0 点赞 0 评论 0

项目:translationstudio8 作者:
/**
 * The Constructor.
 * @param bundleContext
 *            插件所在的 bundle context
 * @param direction
 *            取<code>Converter.DIRECTION_POSITIVE</code>或 <code>Converter.DIRECTION_REVERSE</code>
 */
public ConverterTracker(BundleContext bundleContext, String direction) {
    this.direction = direction;
    supportTypes = new ArrayList<ConverterBean>();
    this.context = bundleContext;
    String filterStr = new AndFilter(new EqFilter(Constants.OBJECTCLASS, Converter.class.getName()), new EqFilter(
            Converter.ATTR_DIRECTION, direction)).toString();
    Filter filter = null;
    try {
        filter = context.createFilter(filterStr);
    } catch (InvalidSyntaxException e) {
        // ignore the exception
        e.printStackTrace();
    }
    if (filter != null) {
        converterServiceTracker = new ServiceTracker(context, filter, new ConverterCustomizer());
    }
    converterServiceTracker.open();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号