hudson.model.Hudson.getJDKs()方法的使用及代码示例

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

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

Hudson.getJDKs介绍

暂无

代码示例

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
   * If there's no JDK configured, there's no point in this axis.
   */
  @Override
  public boolean isInstantiable() {
    return !Hudson.getInstance().getJDKs().isEmpty();
  }
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

@Override
public synchronized void setInstallations(JDK... jdks) {
  List<JDK> list = Hudson.getInstance().getJDKs();
  list.clear();
  list.addAll(Arrays.asList(jdks));
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
   * If there's no JDK configured, there's no point in this axis.
   */
  @Override
  public boolean isInstantiable() {
    return !Hudson.getInstance().getJDKs().isEmpty();
  }
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public synchronized void setInstallations(JDK... jdks) {
  List<JDK> list = Hudson.getInstance().getJDKs();
  list.clear();
  list.addAll(Arrays.asList(jdks));
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
   * If there's no JDK configured, there's no point in this axis.
   */
  @Override
  public boolean isInstantiable() {
    return !Hudson.getInstance().getJDKs().isEmpty();
  }
}

代码示例来源:origin: hudson/hudson-2.x

@Override
public synchronized void setInstallations(JDK... jdks) {
  List<JDK> list = Hudson.getInstance().getJDKs();
  list.clear();
  list.addAll(Arrays.asList(jdks));
}

代码示例来源:origin: hudson/hudson-2.x

/**
   * If there's no JDK configured, there's no point in this axis.
   */
  @Override
  public boolean isInstantiable() {
    return !Hudson.getInstance().getJDKs().isEmpty();
  }
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

@Override
public synchronized void setInstallations(JDK... jdks) {
  List<JDK> list = Hudson.getInstance().getJDKs();
  list.clear();
  list.addAll(Arrays.asList(jdks));
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

@Override
public JDK[] getInstallations() {
  return Hudson.getInstance().getJDKs().toArray(new JDK[Hudson.getInstance().getJDKs().size()]);
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

@Override
public JDK[] getInstallations() {
  return Hudson.getInstance().getJDKs().toArray(new JDK[0]);
}

代码示例来源:origin: hudson/hudson-2.x

@Override
public JDK[] getInstallations() {
  return Hudson.getInstance().getJDKs().toArray(new JDK[0]);
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-core

/**
 * Gets the JDK installation of the given name, or returns null.
 */
public JDK getJDK(String name) {
  if (name == null) {
    // if only one JDK is configured, "default JDK" should mean that JDK.
    List<JDK> jdks = getJDKs();
    if (jdks.size() == 1) {
      return jdks.get(0);
    }
    return null;
  }
  for (JDK j : getJDKs()) {
    if (j.getName().equals(name)) {
      return j;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.hudson/hudson-core

/**
 * Gets the JDK installation of the given name, or returns null.
 */
public JDK getJDK(String name) {
  if (name == null) {
    // if only one JDK is configured, "default JDK" should mean that JDK.
    List<JDK> jdks = getJDKs();
    if (jdks.size() == 1) {
      return jdks.get(0);
    }
    return null;
  }
  for (JDK j : getJDKs()) {
    if (j.getName().equals(name)) {
      return j;
    }
  }
  return null;
}

代码示例来源:origin: hudson/hudson-2.x

/**
 * Gets the JDK installation of the given name, or returns null.
 */
public JDK getJDK(String name) {
  if (name == null) {
    // if only one JDK is configured, "default JDK" should mean that JDK.
    List<JDK> jdks = getJDKs();
    if (jdks.size() == 1) {
      return jdks.get(0);
    }
    return null;
  }
  for (JDK j : getJDKs()) {
    if (j.getName().equals(name)) {
      return j;
    }
  }
  return null;
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

@Override
public JDK[] getInstallations() {
  return Hudson.getInstance().getJDKs().toArray(new JDK[0]);
}

代码示例来源:origin: org.eclipse.hudson.main/hudson-core

/**
 * Gets the JDK installation of the given name, or returns null.
 */
public JDK getJDK(String name) {
  if (name == null) {
    // if only one JDK is configured, "default JDK" should mean that JDK.
    List<JDK> jdks = getJDKs();
    if (jdks.size() == 1) {
      return jdks.get(0);
    }
    return null;
  }
  for (JDK j : getJDKs()) {
    if (j.getName().equals(name)) {
      return j;
    }
  }
  return null;
}

代码示例来源:origin: org.jvnet.hudson.main/hudson-test-harness

hudson.getJDKs().add(new JDK("default",System.getProperty("java.home")));

代码示例来源:origin: org.jvnet.hudson.main/hudson-test-framework

hudson.getJDKs().add(new JDK("default",System.getProperty("java.home")));

代码示例来源:origin: org.eclipse.hudson/hudson-test-framework

hudson.getJDKs().add(new JDK("default", System.getProperty("java.home")));

相关文章

微信公众号

最新文章

更多

Hudson类方法