org.osgi.resource.Wiring.getRequiredResourceWires()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(8.5k)|赞(0)|评价(0)|浏览(81)

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

Wiring.getRequiredResourceWires介绍

[英]Returns the Wires to the Requirement in use by this wiring.
[中]将导线返回到此导线使用的要求。

代码示例

代码示例来源:origin: apache/felix

for (Wire wire : wiring.getRequiredResourceWires(null))

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

if (candWiring != null)
  for (Wire w : candWiring.getRequiredResourceWires(null))

代码示例来源:origin: apache/felix

for (Wire wire : wiring.getRequiredResourceWires(null)) {
  if (PackageNamespace.PACKAGE_NAMESPACE
      .equals(wire.getCapability().getNamespace())) {

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

for (Wire wire : wiring.getRequiredResourceWires(null)) {
  if (PackageNamespace.PACKAGE_NAMESPACE
      .equals(wire.getCapability().getNamespace())) {

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

for (Wire wire : wiring.getRequiredResourceWires(null)) {
  if (PackageNamespace.PACKAGE_NAMESPACE
      .equals(wire.getCapability().getNamespace())) {

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

for (Wire wire : wiring.getRequiredResourceWires(null)) {
  if (PackageNamespace.PACKAGE_NAMESPACE
      .equals(wire.getCapability().getNamespace())) {

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

for (Wire wire : wiring.getRequiredResourceWires(null)) {
  if (PackageNamespace.PACKAGE_NAMESPACE
      .equals(wire.getCapability().getNamespace())) {

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

rc.getWirings().get(req.getResource()).getRequiredResourceWires(null);
req = getDeclaredRequirement(req);
for (Wire w : wires)

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

private Capability getSatisfyingCapability(Requirement req)
{
  // If the requiring revision is not resolved, then check in the
  // candidate map for its matching candidate.
  Capability cap = m_allCandidates.getFirstCandidate(req);
  // Otherwise, if the requiring revision is resolved then check
  // in its wires for the capability satisfying the requirement.
  if (cap == null && m_context.getWirings().containsKey(req.getResource()))
  {
    List<Wire> wires =
        m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null);
    req = getDeclaredRequirement(req);
    for (Wire w : wires)
    {
      if (w.getRequirement().equals(req))
      {
        // TODO: RESOLVER - This is not 100% correct, since requirements for
        //       dynamic imports with wildcards will reside on many wires and
        //       this code only finds the first one, not necessarily the correct
        //       one. This is only used for the diagnostic message, but it still
        //       could confuse the user.
        cap = w.getCapability();
        break;
      }
    }
  }
  return cap;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.resolve

private Capability getSatisfyingCapability(Requirement req)
{
  // If the requiring revision is not resolved, then check in the
  // candidate map for its matching candidate.
  Capability cap = m_allCandidates.getFirstCandidate(req);
  // Otherwise, if the requiring revision is resolved then check
  // in its wires for the capability satisfying the requirement.
  if (cap == null && m_context.getWirings().containsKey(req.getResource()))
  {
    List<Wire> wires =
        m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null);
    req = getDeclaredRequirement(req);
    for (Wire w : wires)
    {
      if (w.getRequirement().equals(req))
      {
        // TODO: RESOLVER - This is not 100% correct, since requirements for
        //       dynamic imports with wildcards will reside on many wires and
        //       this code only finds the first one, not necessarily the correct
        //       one. This is only used for the diagnostic message, but it still
        //       could confuse the user.
        cap = w.getCapability();
        break;
      }
    }
  }
  return cap;
}

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

private Capability getSatisfyingCapability(Requirement req)
  {
    // If the requiring revision is not resolved, then check in the
    // candidate map for its matching candidate.
    Capability cap = m_allCandidates.getFirstCandidate(req);
    // Otherwise, if the requiring revision is resolved then check
    // in its wires for the capability satisfying the requirement.
    if (cap == null && m_context.getWirings().containsKey(req.getResource()))
    {
      List<Wire> wires =
          m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null);
      req = getDeclaredRequirement(req);
      for (Wire w : wires)
      {
        if (w.getRequirement().equals(req))
        {
          // TODO: RESOLVER - This is not 100% correct, since requirements for
          //       dynamic imports with wildcards will reside on many wires and
          //       this code only finds the first one, not necessarily the correct
          //       one. This is only used for the diagnostic message, but it still
          //       could confuse the user.
          cap = w.getCapability();
          break;
        }
      }
    }
    return cap;
  }
}

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

private Capability getSatisfyingCapability(Requirement req)
  {
    // If the requiring revision is not resolved, then check in the
    // candidate map for its matching candidate.
    Capability cap = m_allCandidates.getFirstCandidate(req);
    // Otherwise, if the requiring revision is resolved then check
    // in its wires for the capability satisfying the requirement.
    if (cap == null && m_context.getWirings().containsKey(req.getResource()))
    {
      List<Wire> wires =
          m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null);
      req = getDeclaredRequirement(req);
      for (Wire w : wires)
      {
        if (w.getRequirement().equals(req))
        {
          // TODO: RESOLVER - This is not 100% correct, since requirements for
          //       dynamic imports with wildcards will reside on many wires and
          //       this code only finds the first one, not necessarily the correct
          //       one. This is only used for the diagnostic message, but it still
          //       could confuse the user.
          cap = w.getCapability();
          break;
        }
      }
    }
    return cap;
  }
}

代码示例来源:origin: apache/felix

private Capability getSatisfyingCapability(Requirement req)
{
  // If the requiring revision is not resolved, then check in the
  // candidate map for its matching candidate.
  Capability cap = m_allCandidates.getFirstCandidate(req);
  // Otherwise, if the requiring revision is resolved then check
  // in its wires for the capability satisfying the requirement.
  if (cap == null && m_context.getWirings().containsKey(req.getResource()))
  {
    List<Wire> wires =
        m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null);
    req = getDeclaredRequirement(req);
    for (Wire w : wires)
    {
      if (w.getRequirement().equals(req))
      {
        // TODO: RESOLVER - This is not 100% correct, since requirements for
        //       dynamic imports with wildcards will reside on many wires and
        //       this code only finds the first one, not necessarily the correct
        //       one. This is only used for the diagnostic message, but it still
        //       could confuse the user.
        cap = w.getCapability();
        break;
      }
    }
  }
  return cap;
}

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

private Capability getSatisfyingCapability(Requirement req)
{
  // If the requiring revision is not resolved, then check in the
  // candidate map for its matching candidate.
  Capability cap = m_allCandidates.getFirstCandidate(req);
  // Otherwise, if the requiring revision is resolved then check
  // in its wires for the capability satisfying the requirement.
  if (cap == null && m_context.getWirings().containsKey(req.getResource()))
  {
    List<Wire> wires =
        m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null);
    req = getDeclaredRequirement(req);
    for (Wire w : wires)
    {
      if (w.getRequirement().equals(req))
      {
        // TODO: RESOLVER - This is not 100% correct, since requirements for
        //       dynamic imports with wildcards will reside on many wires and
        //       this code only finds the first one, not necessarily the correct
        //       one. This is only used for the diagnostic message, but it still
        //       could confuse the user.
        cap = w.getCapability();
        break;
      }
    }
  }
  return cap;
}

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

private Capability getSatisfyingCapability(Requirement req)
  {
    // If the requiring revision is not resolved, then check in the
    // candidate map for its matching candidate.
    Capability cap = m_allCandidates.getFirstCandidate(req);
    // Otherwise, if the requiring revision is resolved then check
    // in its wires for the capability satisfying the requirement.
    if (cap == null && m_context.getWirings().containsKey(req.getResource()))
    {
      List<Wire> wires =
          m_context.getWirings().get(req.getResource()).getRequiredResourceWires(null);
      req = getDeclaredRequirement(req);
      for (Wire w : wires)
      {
        if (w.getRequirement().equals(req))
        {
          // TODO: RESOLVER - This is not 100% correct, since requirements for
          //       dynamic imports with wildcards will reside on many wires and
          //       this code only finds the first one, not necessarily the correct
          //       one. This is only used for the diagnostic message, but it still
          //       could confuse the user.
          cap = w.getCapability();
          break;
        }
      }
    }
    return cap;
  }
}

代码示例来源:origin: com.github.veithen.cosmos/cosmos-equinox

rc.getWirings().get(req.getResource()).getRequiredResourceWires(null);
req = getDeclaredRequirement(req);
for (Wire w : wires)

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

if (candWiring != null)
  for (Wire w : candWiring.getRequiredResourceWires(null))

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

for (Wire wire : wiring.getRequiredResourceWires(null))

代码示例来源:origin: apache/felix

for (Wire wire : wiring.getRequiredResourceWires(null))

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

for (Wire wire : wiring.getRequiredResourceWires(null))

相关文章