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

x33g5p2x  于2022-01-16 转载在 其他  
字(4.4k)|赞(0)|评价(0)|浏览(101)

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

Analyzer.getJarFromName介绍

[英]Try to get a Jar from a file name/path or a url, or in last resort from the classpath name part of their files.
[中]

代码示例

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

public void setClasspath(String[] classpath) {
  for (int i = 0; i < classpath.length; i++) {
    Jar jar = getJarFromName(classpath[i], " setting classpath");
    if (jar != null)
      addClasspath(jar);
  }
}

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

public void setClasspath(String[] classpath) {
  for (int i = 0; i < classpath.length; i++) {
    Jar jar = getJarFromName(classpath[i], " setting classpath");
    if (jar != null)
      addClasspath(jar);
  }
}

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

public void setClasspath(String[] classpath) {
  for (int i = 0; i < classpath.length; i++) {
    Jar jar = getJarFromName(classpath[i], " setting classpath");
    if (jar != null)
      addClasspath(jar);
  }
}

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

public void setClasspath(String[] classpath) {
  for (int i = 0; i < classpath.length; i++) {
    Jar jar = getJarFromName(classpath[i], " setting classpath");
    if (jar != null)
      addClasspath(jar);
  }
}

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

public void setClasspath(String[] classpath) {
  for (int i = 0; i < classpath.length; i++) {
    Jar jar = getJarFromName(classpath[i], " setting classpath");
    if (jar != null)
      addClasspath(jar);
  }
}

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

public List<Jar> getClasspath() {
  if (firstUse) {
    firstUse = false;
    String cp = getProperty(CLASSPATH);
    if (cp != null)
      for (String s : split(cp)) {
        Jar jar = getJarFromName(s, "getting classpath");
        if (jar != null)
          addClasspath(jar);
        else
          warning("Cannot find entry on -classpath: %s", s);
      }
  }
  return classpath;
}

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

public List<Jar> getClasspath() {
  if (firstUse) {
    firstUse = false;
    String cp = getProperty(CLASSPATH);
    if (cp != null)
      for (String s : split(cp)) {
        Jar jar = getJarFromName(s, "getting classpath");
        if (jar != null)
          addClasspath(jar);
        else
          warning("Cannot find entry on -classpath: %s", s);
      }
  }
  return classpath;
}

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

public List<Jar> getClasspath() {
  if (firstUse) {
    firstUse = false;
    String cp = getProperty(CLASSPATH);
    if (cp != null)
      for (String s : split(cp)) {
        Jar jar = getJarFromName(s, "getting classpath");
        if (jar != null)
          addClasspath(jar);
        else
          warning("Cannot find entry on -classpath: %s", s);
      }
  }
  return classpath;
}

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

public List<Jar> getClasspath() {
  if (firstUse) {
    firstUse = false;
    String cp = getProperty(CLASSPATH);
    if (cp != null)
      for (String s : split(cp)) {
        Jar jar = getJarFromName(s, "getting classpath");
        if (jar != null)
          addClasspath(jar);
        else
          warning("Cannot find entry on -classpath: %s", s);
      }
  }
  return classpath;
}

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

public List<Jar> getClasspath() {
  if (firstUse) {
    firstUse = false;
    String cp = getProperty(CLASSPATH);
    if (cp != null)
      for (String s : split(cp)) {
        Jar jar = getJarFromName(s, "getting classpath");
        if (jar != null)
          addClasspath(jar);
        else
          warning("Cannot find entry on -classpath: %s", s);
      }
  }
  return classpath;
}

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

/**
 * Set the classpath for this analyzer by file.
 * 
 * @param classpath
 * @throws IOException
 */
public void setClasspath(Collection<?> classpath) throws IOException {
  for (Object cpe : classpath) {
    if (cpe instanceof Jar) {
      addClasspath((Jar) cpe);
    } else if (cpe instanceof File) {
      File f = (File) cpe;
      if (!f.exists()) {
        error("Missing file on classpath: %s", IO.absolutePath(f));
        continue;
      }
      addClasspath(f);
    } else if (cpe instanceof String) {
      Jar j = getJarFromName((String) cpe, " setting classpath");
      if (j == null) {
        continue;
      }
      addClasspath(j);
    } else {
      error("Cannot convert to JAR to add to classpath %s. Not a File, Jar, or String", cpe);
    }
  }
}

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

/**
 * Set the classpath for this analyzer by file.
 * 
 * @param classpath
 * @throws IOException
 */
public void setClasspath(Collection<?> classpath) throws IOException {
  for (Object cpe : classpath) {
    if (cpe instanceof Jar) {
      addClasspath((Jar) cpe);
    } else if (cpe instanceof File) {
      File f = (File) cpe;
      if (!f.exists()) {
        error("Missing file on classpath: %s", IO.absolutePath(f));
        continue;
      }
      addClasspath(f);
    } else if (cpe instanceof String) {
      Jar j = getJarFromName((String) cpe, " setting classpath");
      if (j == null) {
        continue;
      }
      addClasspath(j);
    } else {
      error("Cannot convert to JAR to add to classpath %s. Not a File, Jar, or String", cpe);
    }
  }
}

相关文章

Analyzer类方法