org.eclipse.osgi.service.resolver.State.linkDynamicImport()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(1.8k)|赞(0)|评价(0)|浏览(148)

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

State.linkDynamicImport介绍

[英]Attempts to find an ExportPackageDescription that will satisfy a dynamic import for the specified requestedPackage for the specified importingBundle. If no ExportPackageDescription is available that satisfies a dynamic import for the importingBundle then null is returned.
[中]尝试查找ExportPackageDescription,该描述将满足指定importingBundle的指定requestedPackage的动态导入。如果没有满足importingBundle动态导入的ExportPackageDescription可用,则返回null

代码示例

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

private PackageSource findDynamicSource(String pkgName) {
  if (isDynamicallyImported(pkgName)) {
    ExportPackageDescription exportPackage = bundle.getFramework().getAdaptor().getState().linkDynamicImport(proxy.getBundleDescription(), pkgName);
    if (exportPackage != null) {
      PackageSource source = createExportPackageSource(exportPackage, null);
      synchronized (this) {
        if (importedSources == null)
          importedSources = new KeyedHashSet(false);
      }
      synchronized (importedSources) {
        importedSources.add(source);
      }
      return source;
    }
  }
  return null;
}

代码示例来源:origin: org.jibx.config.3rdparty.org.eclipse/org.eclipse.osgi

private PackageSource findDynamicSource(String pkgName) {
  if (isDynamicallyImported(pkgName)) {
    ExportPackageDescription exportPackage = bundle.getFramework().getAdaptor().getState().linkDynamicImport(proxy.getBundleDescription(), pkgName);
    if (exportPackage != null) {
      PackageSource source = createExportPackageSource(exportPackage, null);
      synchronized (this) {
        if (importedSources == null)
          importedSources = new KeyedHashSet(false);
      }
      synchronized (importedSources) {
        importedSources.add(source);
      }
      return source;
    }
  }
  return null;
}

相关文章