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

x33g5p2x  于2022-01-22 转载在 其他  
字(4.2k)|赞(0)|评价(0)|浏览(84)

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

Jar.copy介绍

暂无

代码示例

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

/**
 * Cop
 * 
 * @param dest
 * @param srce
 * @param path
 * @param overwriteResource
 */
private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  logger.debug("copy d={} s={} p={}", dest, srce, path);
  dest.copy(srce, path, overwrite);
  if (hasSources())
    dest.copy(srce, "OSGI-OPT/src/" + path, overwrite);
  // bnd.info sources must be preprocessed
  String bndInfoPath = path + "/bnd.info";
  Resource r = dest.getResource(bndInfoPath);
  if (r != null && !(r instanceof PreprocessResource)) {
    logger.debug("preprocessing bnd.info");
    PreprocessResource pp = new PreprocessResource(this, r);
    dest.putResource(bndInfoPath, pp);
  }
  if (hasSources()) {
    String srcPath = "OSGI-OPT/src/" + path;
    Map<String, Resource> srcContents = srce.getDirectories()
      .get(srcPath);
    if (srcContents != null) {
      dest.addDirectory(srcContents, overwrite);
    }
  }
}

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

/**
 * Cop
 * 
 * @param dest
 * @param srce
 * @param path
 * @param overwriteResource
 */
private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  logger.debug("copy d={} s={} p={}", dest, srce, path);
  dest.copy(srce, path, overwrite);
  if (hasSources())
    dest.copy(srce, "OSGI-OPT/src/" + path, overwrite);
  // bnd.info sources must be preprocessed
  String bndInfoPath = path + "/bnd.info";
  Resource r = dest.getResource(bndInfoPath);
  if (r != null && !(r instanceof PreprocessResource)) {
    logger.debug("preprocessing bnd.info");
    PreprocessResource pp = new PreprocessResource(this, r);
    dest.putResource(bndInfoPath, pp);
  }
  if (hasSources()) {
    String srcPath = "OSGI-OPT/src/" + path;
    Map<String, Resource> srcContents = srce.getDirectories()
      .get(srcPath);
    if (srcContents != null) {
      dest.addDirectory(srcContents, overwrite);
    }
  }
}

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

/**
 * Cop
 * 
 * @param dest
 * @param srce
 * @param path
 * @param overwriteResource
 */
private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  trace("copy d=" + dest + " s=" + srce +" p="+ path);
  dest.copy(srce, path, overwrite);
  
  // bnd.info sources must be preprocessed
  String bndInfoPath = path + "/bnd.info";
  Resource r = dest.getResource(bndInfoPath);
  if ( r != null && !(r instanceof PreprocessResource)) {
    trace("preprocessing bnd.info");
    PreprocessResource pp = new PreprocessResource(this, r);
    dest.putResource(bndInfoPath, pp);
  }
  
  if (hasSources()) {
    String srcPath = "OSGI-OPT/src/" + path;
    Map<String,Resource> srcContents = srce.getDirectories().get(srcPath);
    if (srcContents != null) {
      dest.addDirectory(srcContents, overwrite);
    }
  }
}

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

/**
 * Cop
 *
 * @param dest
 * @param srce
 * @param path
 * @param overwriteResource
 */
private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  trace("copy d=" + dest + " s=" + srce + " p=" + path);
  dest.copy(srce, path, overwrite);
  // bnd.info sources must be preprocessed
  String bndInfoPath = path + "/bnd.info";
  Resource r = dest.getResource(bndInfoPath);
  if (r != null && !(r instanceof PreprocessResource)) {
    trace("preprocessing bnd.info");
    PreprocessResource pp = new PreprocessResource(this, r);
    dest.putResource(bndInfoPath, pp);
  }
  if (hasSources()) {
    String srcPath = "OSGI-OPT/src/" + path;
    Map<String,Resource> srcContents = srce.getDirectories().get(srcPath);
    if (srcContents != null) {
      dest.addDirectory(srcContents, overwrite);
    }
  }
}

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

/**
 * Cop
 *
 * @param dest
 * @param srce
 * @param path
 * @param overwriteResource
 */
private void copy(Jar dest, Jar srce, String path, boolean overwrite) {
  trace("copy d=" + dest + " s=" + srce + " p=" + path);
  dest.copy(srce, path, overwrite);
  // bnd.info sources must be preprocessed
  String bndInfoPath = path + "/bnd.info";
  Resource r = dest.getResource(bndInfoPath);
  if (r != null && !(r instanceof PreprocessResource)) {
    trace("preprocessing bnd.info");
    PreprocessResource pp = new PreprocessResource(this, r);
    dest.putResource(bndInfoPath, pp);
  }
  if (hasSources()) {
    String srcPath = "OSGI-OPT/src/" + path;
    Map<String,Resource> srcContents = srce.getDirectories().get(srcPath);
    if (srcContents != null) {
      dest.addDirectory(srcContents, overwrite);
    }
  }
}

相关文章

微信公众号

最新文章

更多