hudson.Launcher.printCommandLine()方法的使用及代码示例

x33g5p2x  于2022-01-23 转载在 其他  
字(5.2k)|赞(0)|评价(0)|浏览(114)

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

Launcher.printCommandLine介绍

[英]Prints out the command line to the listener so that users know what we are doing.
[中]将命令行打印到侦听器,以便用户知道我们在做什么。

代码示例

代码示例来源:origin: jenkinsci/jenkins

/**
 * Prints out the command line to the listener with some portions masked to prevent sensitive information from being
 * recorded on the listener.
 *
 * @param cmd     The commands
 * @param mask    An array of booleans which control whether a cmd element should be masked (<code>true</code>) or
 *                remain unmasked (<code>false</code>).
 * @param workDir The work dir.
 */
protected final void maskedPrintCommandLine(@Nonnull List<String> cmd, @CheckForNull boolean[] mask, @CheckForNull FilePath workDir) {
  if(mask==null) {
    printCommandLine(cmd.toArray(new String[cmd.size()]),workDir);
    return;
  }
  
  assert mask.length == cmd.size();
  final String[] masked = new String[cmd.size()];
  for (int i = 0; i < cmd.size(); i++) {
    if (mask[i]) {
      masked[i] = "********";
    } else {
      masked[i] = cmd.get(i);
    }
  }
  printCommandLine(masked, workDir);
}

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

/**
 * Prints out the command line to the listener with some portions masked to
 * prevent sensitive information from being recorded on the listener.
 *
 * @param cmd The commands
 * @param mask An array of booleans which control whether a cmd element
 * should be masked (<code>true</code>) or remain unmasked
 * (<code>false</code>).
 * @param workDir The work dir.
 */
protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) {
  if (mask == null) {
    printCommandLine(cmd.toArray(new String[cmd.size()]), workDir);
    return;
  }
  assert mask.length == cmd.size();
  final String[] masked = new String[cmd.size()];
  for (int i = 0; i < cmd.size(); i++) {
    if (mask[i]) {
      masked[i] = "********";
    } else {
      masked[i] = cmd.get(i);
    }
  }
  printCommandLine(masked, workDir);
}

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

/**
 * Prints out the command line to the listener with some portions masked to prevent sensitive information from being
 * recorded on the listener.
 *
 * @param cmd     The commands
 * @param mask    An array of booleans which control whether a cmd element should be masked (<code>true</code>) or
 *                remain unmasked (<code>false</code>).
 * @param workDir The work dir.
 */
protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) {
  if(mask==null) {
    printCommandLine(cmd.toArray(new String[cmd.size()]),workDir);
    return;
  }
  
  assert mask.length == cmd.size();
  final String[] masked = new String[cmd.size()];
  for (int i = 0; i < cmd.size(); i++) {
    if (mask[i]) {
      masked[i] = "********";
    } else {
      masked[i] = cmd.get(i);
    }
  }
  printCommandLine(masked, workDir);
}
protected final void maskedPrintCommandLine(String[] cmd, boolean[] mask, FilePath workDir) {

代码示例来源:origin: org.jenkins-ci.main/jenkins-core

/**
 * Prints out the command line to the listener with some portions masked to prevent sensitive information from being
 * recorded on the listener.
 *
 * @param cmd     The commands
 * @param mask    An array of booleans which control whether a cmd element should be masked (<code>true</code>) or
 *                remain unmasked (<code>false</code>).
 * @param workDir The work dir.
 */
protected final void maskedPrintCommandLine(@Nonnull List<String> cmd, @CheckForNull boolean[] mask, @CheckForNull FilePath workDir) {
  if(mask==null) {
    printCommandLine(cmd.toArray(new String[cmd.size()]),workDir);
    return;
  }
  
  assert mask.length == cmd.size();
  final String[] masked = new String[cmd.size()];
  for (int i = 0; i < cmd.size(); i++) {
    if (mask[i]) {
      masked[i] = "********";
    } else {
      masked[i] = cmd.get(i);
    }
  }
  printCommandLine(masked, workDir);
}

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

/**
 * Prints out the command line to the listener with some portions masked to prevent sensitive information from being
 * recorded on the listener.
 *
 * @param cmd     The commands
 * @param mask    An array of booleans which control whether a cmd element should be masked (<code>true</code>) or
 *                remain unmasked (<code>false</code>).
 * @param workDir The work dir.
 */
protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) {
  if(mask==null) {
    printCommandLine(cmd.toArray(new String[cmd.size()]),workDir);
    return;
  }
  
  assert mask.length == cmd.size();
  final String[] masked = new String[cmd.size()];
  for (int i = 0; i < cmd.size(); i++) {
    if (mask[i]) {
      masked[i] = "********";
    } else {
      masked[i] = cmd.get(i);
    }
  }
  printCommandLine(masked, workDir);
}
protected final void maskedPrintCommandLine(String[] cmd, boolean[] mask, FilePath workDir) {

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

/**
 * Prints out the command line to the listener with some portions masked to prevent sensitive information from being
 * recorded on the listener.
 *
 * @param cmd     The commands
 * @param mask    An array of booleans which control whether a cmd element should be masked (<code>true</code>) or
 *                remain unmasked (<code>false</code>).
 * @param workDir The work dir.
 */
protected final void maskedPrintCommandLine(List<String> cmd, boolean[] mask, FilePath workDir) {
  if(mask==null) {
    printCommandLine(cmd.toArray(new String[cmd.size()]),workDir);
    return;
  }
  
  assert mask.length == cmd.size();
  final String[] masked = new String[cmd.size()];
  for (int i = 0; i < cmd.size(); i++) {
    if (mask[i]) {
      masked[i] = "********";
    } else {
      masked[i] = cmd.get(i);
    }
  }
  printCommandLine(masked, workDir);
}
protected final void maskedPrintCommandLine(String[] cmd, boolean[] mask, FilePath workDir) {

相关文章