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

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

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

Builder.resolveFiles介绍

暂无

代码示例

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

private void resolveFiles(File dir, FileFilter filter, boolean recursive, String path, Map<String,File> files,
    boolean flatten) {
  if (doNotCopy(dir.getName())) {
    return;
  }
  File[] fs = dir.listFiles(filter);
  for (File file : fs) {
    if (file.isDirectory()) {
      if (recursive) {
        String nextPath;
        if (flatten)
          nextPath = path;
        else
          nextPath = appendPath(path, file.getName());
        resolveFiles(file, filter, recursive, nextPath, files, flatten);
      }
      // Directories are ignored otherwise
    } else {
      String p = appendPath(path, file.getName());
      if (files.containsKey(p))
        warning("Include-Resource overwrites entry %s from file %s", p, file);
      files.put(p, file);
    }
  }
  if (fs.length == 0) {
    File empty = new File(dir, Constants.EMPTY_HEADER);
    files.put(appendPath(path, empty.getName()), empty);
  }
}

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

private void resolveFiles(File dir, FileFilter filter, boolean recursive, String path, Map<String,File> files,
    boolean flatten) {
  if (doNotCopy(dir.getName())) {
    return;
  }
  File[] fs = dir.listFiles(filter);
  for (File file : fs) {
    if (file.isDirectory()) {
      if (recursive) {
        String nextPath;
        if (flatten)
          nextPath = path;
        else
          nextPath = appendPath(path, file.getName());
        resolveFiles(file, filter, recursive, nextPath, files, flatten);
      }
      // Directories are ignored otherwise
    } else {
      String p = appendPath(path, file.getName());
      if (files.containsKey(p))
        warning(Constants.INCLUDE_RESOURCE + " overwrites entry %s from file %s", p, file);
      files.put(p, file);
    }
  }
  if (fs.length == 0) {
    File empty = new File(dir, Constants.EMPTY_HEADER);
    files.put(appendPath(path, empty.getName()), empty);
  }
}

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

private void resolveFiles(File dir, FileFilter filter, boolean recursive, String path, Map<String,File> files,
    boolean flatten) {
  if (doNotCopy(dir.getName())) {
    return;
  }
  File[] fs = dir.listFiles(filter);
  for (File file : fs) {
    if (file.isDirectory()) {
      if (recursive) {
        String nextPath;
        if (flatten)
          nextPath = path;
        else
          nextPath = appendPath(path, file.getName());
        resolveFiles(file, filter, recursive, nextPath, files, flatten);
      }
      // Directories are ignored otherwise
    } else {
      String p = appendPath(path, file.getName());
      if (files.containsKey(p))
        warning(Constants.INCLUDE_RESOURCE + " overwrites entry %s from file %s", p, file);
      files.put(p, file);
    }
  }
  if (fs.length == 0) {
    File empty = new File(dir, Constants.EMPTY_HEADER);
    files.put(appendPath(path, empty.getName()), empty);
  }
}

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

private void resolveFiles(File dir, FileFilter filter, boolean recursive, String path, Map<String, File> files,
  boolean flatten) {
  if (doNotCopy(dir)) {
    return;
  }
  File[] fs = dir.listFiles(filter);
  for (File file : fs) {
    if (file.isDirectory()) {
      if (recursive) {
        String nextPath;
        if (flatten)
          nextPath = path;
        else
          nextPath = appendPath(path, file.getName());
        resolveFiles(file, filter, recursive, nextPath, files, flatten);
      }
      // Directories are ignored otherwise
    } else {
      String p = appendPath(path, file.getName());
      if (files.containsKey(p))
        warning(Constants.INCLUDE_RESOURCE + " overwrites entry %s from file %s", p, file);
      files.put(p, file);
    }
  }
  if (fs.length == 0) {
    File empty = new File(dir, Constants.EMPTY_HEADER);
    files.put(appendPath(path, empty.getName()), empty);
  }
}

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

private void resolveFiles(File dir, FileFilter filter, boolean recursive, String path, Map<String, File> files,
  boolean flatten) {
  if (doNotCopy(dir)) {
    return;
  }
  File[] fs = dir.listFiles(filter);
  for (File file : fs) {
    if (file.isDirectory()) {
      if (recursive) {
        String nextPath;
        if (flatten)
          nextPath = path;
        else
          nextPath = appendPath(path, file.getName());
        resolveFiles(file, filter, recursive, nextPath, files, flatten);
      }
      // Directories are ignored otherwise
    } else {
      String p = appendPath(path, file.getName());
      if (files.containsKey(p))
        warning(Constants.INCLUDE_RESOURCE + " overwrites entry %s from file %s", p, file);
      files.put(p, file);
    }
  }
  if (fs.length == 0) {
    File empty = new File(dir, Constants.EMPTY_HEADER);
    files.put(appendPath(path, empty.getName()), empty);
  }
}

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

private String doResourceDirectory(Jar jar, Map<String, String> extra, Instructions preprocess, File sourceFile,
  String destinationPath) throws Exception {
  String filter = extra.get("filter:");
  boolean flatten = isTrue(extra.get("flatten:"));
  boolean recursive = true;
  String directive = extra.get("recursive:");
  if (directive != null) {
    recursive = isTrue(directive);
  }
  Instruction.Filter iFilter = null;
  if (filter != null) {
    iFilter = new Instruction.Filter(new Instruction(filter), recursive, getDoNotCopy());
  } else {
    iFilter = new Instruction.Filter(null, recursive, getDoNotCopy());
  }
  Map<String, File> files = newMap();
  resolveFiles(sourceFile, iFilter, recursive, destinationPath, files, flatten);
  for (Map.Entry<String, File> entry : files.entrySet()) {
    copy(jar, entry.getKey(), entry.getValue(), preprocess, extra);
  }
  return destinationPath;
}

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

private String doResourceDirectory(Jar jar, Map<String,String> extra, boolean preprocess, File sourceFile,
    String destinationPath) throws Exception {
  String filter = extra.get("filter:");
  boolean flatten = isTrue(extra.get("flatten:"));
  boolean recursive = true;
  String directive = extra.get("recursive:");
  if (directive != null) {
    recursive = isTrue(directive);
  }
  Instruction.Filter iFilter = null;
  if (filter != null) {
    iFilter = new Instruction.Filter(new Instruction(filter), recursive, getDoNotCopy());
  } else {
    iFilter = new Instruction.Filter(null, recursive, getDoNotCopy());
  }
  Map<String,File> files = newMap();
  resolveFiles(sourceFile, iFilter, recursive, destinationPath, files, flatten);
  for (Map.Entry<String,File> entry : files.entrySet()) {
    copy(jar, entry.getKey(), entry.getValue(), preprocess, extra);
  }
  return destinationPath;
}

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

private String doResourceDirectory(Jar jar, Map<String,String> extra, Instructions preprocess, File sourceFile,
    String destinationPath) throws Exception {
  String filter = extra.get("filter:");
  boolean flatten = isTrue(extra.get("flatten:"));
  boolean recursive = true;
  String directive = extra.get("recursive:");
  if (directive != null) {
    recursive = isTrue(directive);
  }
  Instruction.Filter iFilter = null;
  if (filter != null) {
    iFilter = new Instruction.Filter(new Instruction(filter), recursive, getDoNotCopy());
  } else {
    iFilter = new Instruction.Filter(null, recursive, getDoNotCopy());
  }
  Map<String,File> files = newMap();
  resolveFiles(sourceFile, iFilter, recursive, destinationPath, files, flatten);
  for (Map.Entry<String,File> entry : files.entrySet()) {
    copy(jar, entry.getKey(), entry.getValue(), preprocess, extra);
  }
  return destinationPath;
}

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

private String doResourceDirectory(Jar jar, Map<String, String> extra, Instructions preprocess, File sourceFile,
  String destinationPath) throws Exception {
  String filter = extra.get("filter:");
  boolean flatten = isTrue(extra.get("flatten:"));
  boolean recursive = true;
  String directive = extra.get("recursive:");
  if (directive != null) {
    recursive = isTrue(directive);
  }
  Instruction.Filter iFilter = null;
  if (filter != null) {
    iFilter = new Instruction.Filter(new Instruction(filter), recursive, getDoNotCopy());
  } else {
    iFilter = new Instruction.Filter(null, recursive, getDoNotCopy());
  }
  Map<String, File> files = newMap();
  resolveFiles(sourceFile, iFilter, recursive, destinationPath, files, flatten);
  for (Map.Entry<String, File> entry : files.entrySet()) {
    copy(jar, entry.getKey(), entry.getValue(), preprocess, extra);
  }
  return destinationPath;
}

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

private String doResourceDirectory(Jar jar, Map<String,String> extra, Instructions preprocess, File sourceFile,
    String destinationPath) throws Exception {
  String filter = extra.get("filter:");
  boolean flatten = isTrue(extra.get("flatten:"));
  boolean recursive = true;
  String directive = extra.get("recursive:");
  if (directive != null) {
    recursive = isTrue(directive);
  }
  Instruction.Filter iFilter = null;
  if (filter != null) {
    iFilter = new Instruction.Filter(new Instruction(filter), recursive, getDoNotCopy());
  } else {
    iFilter = new Instruction.Filter(null, recursive, getDoNotCopy());
  }
  Map<String,File> files = newMap();
  resolveFiles(sourceFile, iFilter, recursive, destinationPath, files, flatten);
  for (Map.Entry<String,File> entry : files.entrySet()) {
    copy(jar, entry.getKey(), entry.getValue(), preprocess, extra);
  }
  return destinationPath;
}

相关文章

Builder类方法