org.eclipse.equinox.internal.frameworkadmin.utils.Utils.getClauses()方法的使用及代码示例

x33g5p2x  于2022-02-01 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(131)

本文整理了Java中org.eclipse.equinox.internal.frameworkadmin.utils.Utils.getClauses()方法的一些代码示例,展示了Utils.getClauses()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.getClauses()方法的具体详情如下:
包路径:org.eclipse.equinox.internal.frameworkadmin.utils.Utils
类名称:Utils
方法名:getClauses

Utils.getClauses介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin

public static String[] getClausesManifestMainAttributes(URI location, String name) {
  return getClauses(getManifestMainAttributes(location, name));
}

代码示例来源:origin: org.eclipse.equinox/frameworkadmin

public static String[] getClausesManifestMainAttributes(URI location, String name) {
  return getClauses(getManifestMainAttributes(location, name));
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.frameworkadmin

public static String[] getClausesManifestMainAttributes(URI location, String name) {
  return getClauses(getManifestMainAttributes(location, name));
}

代码示例来源:origin: org.eclipse.equinox/frameworkadmin

public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
  URI location = bInfo.getLocation();
  final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
  if (requiredBundles == null)
    return new BundleInfo[] {this.getSystemBundle()};
  String[] clauses = Utils.getClauses(requiredBundles);
  List list = new LinkedList();
  for (int i = 0; i < clauses.length; i++)
    list.add(Utils.getPathFromClause(clauses[i]));
  List ret = new LinkedList();
  ret.add(this.getSystemBundle());
  for (Iterator ite = this.bundleInfosList.iterator(); ite.hasNext();) {
    BundleInfo currentBInfo = (BundleInfo) ite.next();
    URI currentLocation = currentBInfo.getLocation();
    String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
    if (currentSymbolicName == null)
      continue;
    currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
    for (Iterator ite2 = list.iterator(); ite2.hasNext();) {
      String symbolicName = (String) ite2.next();
      if (symbolicName.equals(currentSymbolicName)) {
        ret.add(currentBInfo);
        break;
      }
    }
  }
  return Utils.getBundleInfosFromList(ret);
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.equinox.frameworkadmin

public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
  URI location = bInfo.getLocation();
  final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
  if (requiredBundles == null)
    return new BundleInfo[] {this.getSystemBundle()};
  String[] clauses = Utils.getClauses(requiredBundles);
  List<String> list = new LinkedList<String>();
  for (int i = 0; i < clauses.length; i++)
    list.add(Utils.getPathFromClause(clauses[i]));
  List<BundleInfo> ret = new LinkedList<BundleInfo>();
  ret.add(this.getSystemBundle());
  for (Iterator<BundleInfo> ite = this.bundleInfosList.iterator(); ite.hasNext();) {
    BundleInfo currentBInfo = ite.next();
    URI currentLocation = currentBInfo.getLocation();
    String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
    if (currentSymbolicName == null)
      continue;
    currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
    for (Iterator<String> ite2 = list.iterator(); ite2.hasNext();) {
      String symbolicName = ite2.next();
      if (symbolicName.equals(currentSymbolicName)) {
        ret.add(currentBInfo);
        break;
      }
    }
  }
  return Utils.getBundleInfosFromList(ret);
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.equinox.frameworkadmin

@Override
public BundleInfo[] getPrerequisteBundles(BundleInfo bInfo) {
  URI location = bInfo.getLocation();
  final String requiredBundles = Utils.getManifestMainAttributes(location, Constants.REQUIRE_BUNDLE);
  if (requiredBundles == null)
    return new BundleInfo[] {this.getSystemBundle()};
  String[] clauses = Utils.getClauses(requiredBundles);
  List<String> list = new LinkedList<>();
  for (int i = 0; i < clauses.length; i++)
    list.add(Utils.getPathFromClause(clauses[i]));
  List<BundleInfo> ret = new LinkedList<>();
  ret.add(this.getSystemBundle());
  for (Iterator<BundleInfo> ite = this.bundleInfosList.iterator(); ite.hasNext();) {
    BundleInfo currentBInfo = ite.next();
    URI currentLocation = currentBInfo.getLocation();
    String currentSymbolicName = Utils.getManifestMainAttributes(currentLocation, Constants.BUNDLE_SYMBOLICNAME);
    if (currentSymbolicName == null)
      continue;
    currentSymbolicName = Utils.getPathFromClause(currentSymbolicName);
    for (Iterator<String> ite2 = list.iterator(); ite2.hasNext();) {
      String symbolicName = ite2.next();
      if (symbolicName.equals(currentSymbolicName)) {
        ret.add(currentBInfo);
        break;
      }
    }
  }
  return Utils.getBundleInfosFromList(ret);
}

相关文章