aQute.bnd.osgi.Builder.getExports()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(8.7k)|赞(0)|评价(0)|浏览(99)

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

Builder.getExports介绍

暂无

代码示例

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

@Override
  public void generate(StringBuilder sb, Builder builder) {
    if (builder.getImports() != null) {
      for (PackageRef imp : builder.getImports()
        .keySet()) {
        if (!imp.isJava()) {
          sb.append("(org.osgi.framework.PackagePermission \"");
          sb.append(imp);
          sb.append("\" \"import\")\n");
        }
      }
    }
    if (builder.getExports() != null) {
      for (PackageRef exp : builder.getExports()
        .keySet()) {
        sb.append("(org.osgi.framework.PackagePermission \"");
        sb.append(exp);
        sb.append("\" \"export\")\n");
      }
    }
  }
},

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

public String _permissions(String args[]) {
  StringBuilder sb = new StringBuilder();
  for (String arg : args) {
    if ("packages".equals(arg) || "all".equals(arg)) {
      for (PackageRef imp : getImports().keySet()) {
        if (!imp.isJava()) {
          sb.append("(org.osgi.framework.PackagePermission \"");
          sb.append(imp);
          sb.append("\" \"import\")\r\n");
        }
      }
      for (PackageRef exp : getExports().keySet()) {
        sb.append("(org.osgi.framework.PackagePermission \"");
        sb.append(exp);
        sb.append("\" \"export\")\r\n");
      }
    } else if ("admin".equals(arg) || "all".equals(arg)) {
      sb.append("(org.osgi.framework.AdminPermission)");
    } else if ("permissions".equals(arg))
      ;
    else
      error("Invalid option in ${permissions}: %s", arg);
  }
  return sb.toString();
}

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

public String _permissions(String args[]) {
  StringBuilder sb = new StringBuilder();
  for (String arg : args) {
    if ("packages".equals(arg) || "all".equals(arg)) {
      for (PackageRef imp : getImports().keySet()) {
        if (!imp.isJava()) {
          sb.append("(org.osgi.framework.PackagePermission \"");
          sb.append(imp);
          sb.append("\" \"import\")\r\n");
        }
      }
      for (PackageRef exp : getExports().keySet()) {
        sb.append("(org.osgi.framework.PackagePermission \"");
        sb.append(exp);
        sb.append("\" \"export\")\r\n");
      }
    } else if ("admin".equals(arg) || "all".equals(arg)) {
      sb.append("(org.osgi.framework.AdminPermission)");
    } else if ("permissions".equals(arg))
      ;
    else
      error("Invalid option in ${permissions}: %s", arg);
  }
  return sb.toString();
}

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

public String _permissions(String args[]) {
  StringBuilder sb = new StringBuilder();
  for (String arg : args) {
    if ("packages".equals(arg) || "all".equals(arg)) {
      for (PackageRef imp : getImports().keySet()) {
        if (!imp.isJava()) {
          sb.append("(org.osgi.framework.PackagePermission \"");
          sb.append(imp);
          sb.append("\" \"import\")\r\n");
        }
      }
      for (PackageRef exp : getExports().keySet()) {
        sb.append("(org.osgi.framework.PackagePermission \"");
        sb.append(exp);
        sb.append("\" \"export\")\r\n");
      }
    } else if ("admin".equals(arg) || "all".equals(arg)) {
      sb.append("(org.osgi.framework.AdminPermission)");
    } else if ("permissions".equals(arg))
      ;
    else
      error("Invalid option in ${permissions}: %s", arg);
  }
  return sb.toString();
}

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

@Override
  public void generate(StringBuilder sb, Builder builder) {
    if (builder.getImports() != null) {
      for (PackageRef imp : builder.getImports()
        .keySet()) {
        if (!imp.isJava()) {
          sb.append("(org.osgi.framework.PackagePermission \"");
          sb.append(imp);
          sb.append("\" \"import\")\n");
        }
      }
    }
    if (builder.getExports() != null) {
      for (PackageRef exp : builder.getExports()
        .keySet()) {
        sb.append("(org.osgi.framework.PackagePermission \"");
        sb.append(exp);
        sb.append("\" \"export\")\n");
      }
    }
  }
},

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

/**
   * Called when we 're done with a builder. In this case
   * we retrieve package information from 
   */
  protected void doneBuild(Builder builder) {
    project.exportedPackages.putAll(builder.getExports());
    project.importedPackages.putAll(builder.getImports());
    project.containedPackages.putAll(builder.getContained());
  }
}

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

/**
   * Called when we 're done with a builder. In this case
   * we retrieve package information from 
   */
  protected void doneBuild(Builder builder) {
    project.exportedPackages.putAll(builder.getExports());
    project.importedPackages.putAll(builder.getImports());
    project.containedPackages.putAll(builder.getContained());
  }
}

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

/**
 * Intercept the call to analyze and cleanup versions after we have analyzed
 * the setup. We do not want to cleanup if we are going to verify.
 */
@Override
public void analyze() throws Exception {
  super.analyze();
  cleanupVersion(getImports(), null);
  cleanupVersion(getExports(), getVersion());
  String version = getProperty(BUNDLE_VERSION);
  if (version != null) {
    version = cleanupVersion(version);
    if (version.endsWith(".SNAPSHOT")) {
      version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT"));
    }
    setProperty(BUNDLE_VERSION, version);
  }
}

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

/**
 * Intercept the call to analyze and cleanup versions after we have analyzed
 * the setup. We do not want to cleanup if we are going to verify.
 */
@Override
public void analyze() throws Exception {
  super.analyze();
  cleanupVersion(getImports(), null);
  cleanupVersion(getExports(), getVersion());
  String version = getProperty(BUNDLE_VERSION);
  if (version != null) {
    version = cleanupVersion(version);
    if (version.endsWith(".SNAPSHOT")) {
      version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT"));
    }
    setProperty(BUNDLE_VERSION, version);
  }
}

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

/**
 * Intercept the call to analyze and cleanup versions after we have analyzed
 * the setup. We do not want to cleanup if we are going to verify.
 */
@Override
public void analyze() throws Exception {
  super.analyze();
  cleanupVersion(getImports(), null);
  cleanupVersion(getExports(), getVersion());
  String version = getProperty(BUNDLE_VERSION);
  if (version != null) {
    version = cleanupVersion(version);
    if (version.endsWith(".SNAPSHOT")) {
      version = version.replaceAll("SNAPSHOT$", getProperty(SNAPSHOT, "SNAPSHOT"));
    }
    setProperty(BUNDLE_VERSION, version);
  }
}

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

/**
 * Intercept the call to analyze and cleanup versions after we have analyzed
 * the setup. We do not want to cleanup if we are going to verify.
 */
@Override
public void analyze() throws Exception {
  super.analyze();
  cleanupVersion(getImports(), null);
  cleanupVersion(getExports(), getVersion());
  String version = getProperty(BUNDLE_VERSION);
  if (version != null) {
    version = cleanupVersion(version);
    version = doSnapshot(version);
    setProperty(BUNDLE_VERSION, version);
  }
}

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

/**
 * Intercept the call to analyze and cleanup versions after we have analyzed
 * the setup. We do not want to cleanup if we are going to verify.
 */
@Override
public void analyze() throws Exception {
  super.analyze();
  cleanupVersion(getImports(), null);
  cleanupVersion(getExports(), getVersion());
  String version = getProperty(BUNDLE_VERSION);
  if (version != null) {
    version = cleanupVersion(version);
    version = doSnapshot(version);
    setProperty(BUNDLE_VERSION, version);
  }
}

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

/**
 * Called when we're done with a builder. In this case we retrieve package
 * information from builder.
 */
@Override
protected void doneBuild(Builder builder) throws Exception {
  project.exportedPackages.putAll(builder.getExports());
  project.importedPackages.putAll(builder.getImports());
  project.containedPackages.putAll(builder.getContained());
  xrefClasspath(project.unreferencedClasspathEntries, builder.getImports());
  xrefClasspath(project.unreferencedClasspathEntries, builder.getContained());
  //
  // For the workspace repo, we maintain a map
  // of bsn -> version for this project. So here
  // we update this map. In the startBuild method
  // we cleared the map
  //
  Version version = new Version(cleanupVersion(builder.getVersion()));
  project.versionMap.put(builder.getBsn(), version);
  super.doneBuild(builder);
}

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

/**
 * Called when we're done with a builder. In this case we retrieve package
 * information from builder.
 */
@Override
protected void doneBuild(Builder builder) throws Exception {
  project.exportedPackages.putAll(builder.getExports());
  project.importedPackages.putAll(builder.getImports());
  project.containedPackages.putAll(builder.getContained());
  xrefClasspath(project.unreferencedClasspathEntries, builder.getImports());
  xrefClasspath(project.unreferencedClasspathEntries, builder.getContained());
  //
  // For the workspace repo, we maintain a map
  // of bsn -> version for this project. So here
  // we update this map. In the startBuild method
  // we cleared the map
  //
  Version version = new Version(cleanupVersion(builder.getVersion()));
  project.versionMap.put(builder.getBsn(), version);
  super.doneBuild(builder);
}

相关文章

Builder类方法