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

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

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

State.getBundleByLocation介绍

[英]Returns the bundle descriptor for the bundle with the given location identifier. null is returned if no such bundle is found in this state.
[中]返回具有给定位置标识符的捆绑包的捆绑包描述符。如果在这种状态下找不到这样的包,则返回null。

代码示例

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

public BundleDescription getBundleByLocation(String location) {
  return target.getBundleByLocation(location);
}

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

public BundleDescription getBundleByLocation(String location) {
  return target.getBundleByLocation(location);
}

代码示例来源:origin: org.codehaus.tycho/tycho-osgi-components

public BundleDescription getBundleByLocation( File location )
{
  String absolutePath = location.getAbsolutePath();
  return state.getBundleByLocation( absolutePath );
}

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

public BundleDescription getBundleByLocation(String location) {
  return platformAdmin.getSystemState().getBundleByLocation(location);
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state

public BundleDescription getBundleByLocation(String location) {
  return platformAdmin.getSystemState().getBundleByLocation(location);
}

代码示例来源:origin: org.eclipse.tycho/tycho-core

public State newResolvedState(File basedir, ExecutionEnvironment ee, DependencyArtifacts artifacts)
    throws BundleException {
  Properties properties = getPlatformProperties(new Properties(), null, ee);
  State state = newState(artifacts, properties, false);
  resolveState(state);
  BundleDescription bundleDescription = state.getBundleByLocation(getNormalizedPath(basedir));
  assertResolved(state, bundleDescription);
  return state;
}

代码示例来源:origin: org.eclipse.tycho/tycho-core

public State newResolvedState(MavenProject project, ExecutionEnvironment ee, boolean ignoreEE,
    DependencyArtifacts artifacts) throws BundleException {
  Properties properties = getPlatformProperties(project, ee);
  State state = newState(artifacts, properties, ignoreEE);
  resolveState(state);
  BundleDescription bundleDescription = state.getBundleByLocation(getNormalizedPath(project.getBasedir()));
  assertResolved(state, bundleDescription);
  return state;
}

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

/**
   * @throws BundleException  
   */
  public StateDelta compare(State baseState) throws BundleException {
    BundleDescription[] current = this.getBundles();
    StateDeltaImpl delta = new StateDeltaImpl(this);
    // process additions and updates
    for (int i = 0; i < current.length; i++) {
      BundleDescription existing = baseState.getBundleByLocation(current[i].getLocation());
      if (existing == null)
        delta.recordBundleAdded((BundleDescriptionImpl) current[i]);
      else if (updated.contains(current[i].getLocation()))
        delta.recordBundleUpdated((BundleDescriptionImpl) current[i]);
    }
    // process removals
    BundleDescription[] existing = baseState.getBundles();
    for (int i = 0; i < existing.length; i++) {
      BundleDescription local = getBundleByLocation(existing[i].getLocation());
      if (local == null)
        delta.recordBundleRemoved((BundleDescriptionImpl) existing[i]);
    }
    return delta;
  }
}

代码示例来源:origin: com.github.veithen.cosmos.bootstrap/org.eclipse.osgi.compatibility.state

/**
   * @throws BundleException  
   */
  public StateDelta compare(State baseState) throws BundleException {
    BundleDescription[] current = this.getBundles();
    StateDeltaImpl delta = new StateDeltaImpl(this);
    // process additions and updates
    for (int i = 0; i < current.length; i++) {
      BundleDescription existing = baseState.getBundleByLocation(current[i].getLocation());
      if (existing == null)
        delta.recordBundleAdded((BundleDescriptionImpl) current[i]);
      else if (updated.contains(current[i].getLocation()))
        delta.recordBundleUpdated((BundleDescriptionImpl) current[i]);
    }
    // process removals
    BundleDescription[] existing = baseState.getBundles();
    for (int i = 0; i < existing.length; i++) {
      BundleDescription local = getBundleByLocation(existing[i].getLocation());
      if (local == null)
        delta.recordBundleRemoved((BundleDescriptionImpl) existing[i]);
    }
    return delta;
  }
}

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

/**
   * @throws BundleException  
   */
  public StateDelta compare(State baseState) throws BundleException {
    BundleDescription[] current = this.getBundles();
    StateDeltaImpl delta = new StateDeltaImpl(this);
    // process additions and updates
    for (int i = 0; i < current.length; i++) {
      BundleDescription existing = baseState.getBundleByLocation(current[i].getLocation());
      if (existing == null)
        delta.recordBundleAdded((BundleDescriptionImpl) current[i]);
      else if (updated.contains(current[i].getLocation()))
        delta.recordBundleUpdated((BundleDescriptionImpl) current[i]);
    }
    // process removals
    BundleDescription[] existing = baseState.getBundles();
    for (int i = 0; i < existing.length; i++) {
      BundleDescription local = getBundleByLocation(existing[i].getLocation());
      if (local == null)
        delta.recordBundleRemoved((BundleDescriptionImpl) existing[i]);
    }
    return delta;
  }
}

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

/**
   * @throws BundleException  
   */
  public StateDelta compare(State baseState) throws BundleException {
    BundleDescription[] current = this.getBundles();
    StateDeltaImpl delta = new StateDeltaImpl(this);
    // process additions and updates
    for (int i = 0; i < current.length; i++) {
      BundleDescription existing = baseState.getBundleByLocation(current[i].getLocation());
      if (existing == null)
        delta.recordBundleAdded((BundleDescriptionImpl) current[i]);
      else if (updated.contains(current[i].getLocation()))
        delta.recordBundleUpdated((BundleDescriptionImpl) current[i]);
    }
    // process removals
    BundleDescription[] existing = baseState.getBundles();
    for (int i = 0; i < existing.length; i++) {
      BundleDescription local = getBundleByLocation(existing[i].getLocation());
      if (local == null)
        delta.recordBundleRemoved((BundleDescriptionImpl) existing[i]);
    }
    return delta;
  }
}

代码示例来源:origin: org.eclipse.tycho/tycho-core

BundleDescription bundleDescription = state.getBundleByLocation(project.getBasedir().getAbsolutePath());

相关文章